Bugs: - nginx: /uploads/ wurde von der .jpg/.png-Regex-Location geschluckt -> ^~ Prefix gibt /uploads/ und /api/ Vorrang vor Regex -> Fotos werden jetzt korrekt vom Backend ausgeliefert - TopNav menu-item Klasse war via <style>@apply definiert - Tailwind verarbeitet @apply nur in .css-Dateien, nicht in JSX-style-Tags -> alle Klassen direkt am Element + neuer responsive Aufbau - TopNav mobile-friendlier: Brand-Truncate, Demo-Badge erst ab sm, Dropdown max-w fuer Viewport, Touch-Outside-Close, groessere Touch-Targets Umlaute: - Alle ASCII-Substitutionen (fuer, ueber, aendern, loeschen, Stueck, Geraete, Ruecknahme, Hintertuer, Schluessel, Kuehlschrank, Pruefe, gueltig, etc.) konsequent auf Unicode (für, über, ä, ö, ü, ß) umgestellt. - 26 Dateien betroffen, SQL-Identifier + Import-Pfade + API-Routen ASCII gelassen. - seed.js: Baeckerei -> Baeckerei.. ah Baeckerei -> Bäckerei
52 lines
1.5 KiB
Nginx Configuration File
52 lines
1.5 KiB
Nginx Configuration File
events {}
|
|
|
|
http {
|
|
include mime.types;
|
|
default_type application/octet-stream;
|
|
client_max_body_size 20M;
|
|
sendfile on;
|
|
keepalive_timeout 65;
|
|
|
|
gzip on;
|
|
gzip_vary on;
|
|
gzip_min_length 1024;
|
|
gzip_types text/plain text/css application/json application/javascript
|
|
application/xml+rss text/xml application/xml image/svg+xml;
|
|
|
|
server {
|
|
listen 80 default_server;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# API -> Backend (^~ damit Regex-Locations darunter nicht greifen)
|
|
location ^~ /api/ {
|
|
proxy_pass http://backend:3001/api/;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
|
|
# Uploads -> Backend (^~ wichtig, sonst greift die .jpg-Regex-Location unten)
|
|
location ^~ /uploads/ {
|
|
proxy_pass http://backend:3001/uploads/;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
add_header Cache-Control "public, max-age=86400";
|
|
}
|
|
|
|
# Cache fuer statische Assets im SPA
|
|
location ~* \.(?:js|css|woff2?|ttf|eot|jpg|jpeg|png|gif|svg|ico|webp)$ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
try_files $uri =404;
|
|
}
|
|
|
|
# SPA fallback
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
}
|
|
}
|