diff --git a/Caddyfile b/Caddyfile index e8b1e39..1d572c4 100644 --- a/Caddyfile +++ b/Caddyfile @@ -2,8 +2,10 @@ root * /usr/share/caddy file_server - # Behandle die HTML-Datei als Index - try_files {path} /Just%20a%20QR%20Code.html + @notStatic { + not path_regexp static \.\(js|css|png|jpg|jpeg|gif|svg|ico|json|webmanifest|map|txt|woff2?\)$ + } + try_files {path} /index.html @notStatic # CORS-Header für Cross-Origin-Requests header { diff --git a/Dockerfile b/Dockerfile index 4c1fff0..ca33c80 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,4 +13,4 @@ COPY Caddyfile /etc/caddy/Caddyfile # Exponiere Port 80 EXPOSE 80 -# Caddy startet automatisch mit der Caddyfile-Konfiguration \ No newline at end of file +# Caddy startet automatisch mit der Caddyfile-Konfiguration