forked from colin/resume
Add utils.js to Docker build and update CSP with hash
This commit is contained in:
parent
630ef90df1
commit
0f81e0318e
|
@ -25,8 +25,8 @@
|
|||
Cross-Origin-Resource-Policy "same-origin"
|
||||
Cross-Origin-Opener-Policy "same-origin"
|
||||
|
||||
# Simplified CSP for static content
|
||||
Content-Security-Policy "default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self' data:; font-src 'self' data:; connect-src 'self'; object-src 'none'; frame-ancestors 'none'; base-uri 'none'; form-action 'none';"
|
||||
# CSP with hash for utils.js and nonce for inline scripts
|
||||
Content-Security-Policy "default-src 'none'; script-src 'self' 'sha256-ryQsJ+aghKKD/CeXgx8jtsnZT3Epp3EjIw8RyHIq544='; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:; connect-src 'self'; object-src 'none'; frame-ancestors 'none'; base-uri 'none'; form-action 'none';"
|
||||
}
|
||||
|
||||
# Handle 404s
|
||||
|
|
|
@ -4,6 +4,7 @@ FROM caddy:2-alpine
|
|||
COPY Caddyfile /etc/caddy/Caddyfile
|
||||
COPY index.html /srv/
|
||||
COPY theme.js /srv/
|
||||
COPY utils.js /srv/
|
||||
COPY styles.css /srv/
|
||||
|
||||
# Expose port 8080
|
||||
|
|
Loading…
Reference in New Issue