File tree Expand file tree Collapse file tree 2 files changed +14
-14
lines changed
Expand file tree Collapse file tree 2 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 11{
22 auto_https off
3+ admin off
34}
45
56:80 {
67 root * /srv
7- file_server
88 header {
99 # NOTE: Temporary relaxation — 'unsafe-eval' is required due to mediainfo.js using string eval in the worker.
1010 # TODO: Remove 'unsafe-eval' from script-src once upstream mediainfo.js patches this behavior.
1616 Cross-Origin-Resource-Policy "same-origin"
1717 Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
1818 }
19+
20+ # Restrict allowed HTTP methods to safe ones for static content
21+ @disallowed_methods {
22+ not method GET HEAD OPTIONS
23+ }
24+ header @disallowed_methods {
25+ Allow "GET, HEAD, OPTIONS"
26+ }
27+ respond @disallowed_methods 405
28+
29+ file_server
1930 try_files {path} /index.html
2031}
Original file line number Diff line number Diff line change @@ -31,20 +31,9 @@ RUN pnpm build
3131
3232FROM caddy:2-alpine
3333
34- RUN adduser \
35- --gecos "" \
36- --system \
37- --no-create-home \
38- --uid "900" \
39- "appuser"
34+ COPY --from=builder /app/dist /srv
4035
41- USER appuser
42-
43- COPY --from=builder --chown=appuser:appuser /app/dist /srv
44-
45- # COPY --chown=appuser:appuser dist /srv
46-
47- COPY --chown=appuser:appuser Caddyfile /etc/caddy/Caddyfile
36+ COPY Caddyfile /etc/caddy/Caddyfile
4837
4938EXPOSE 80
5039
You can’t perform that action at this time.
0 commit comments