forked from colin/resume
Fix Docker configuration to include theme.js and styles.css files
This commit is contained in:
parent
1c328df0c7
commit
71e142b82e
|
@ -3,17 +3,6 @@
|
|||
file_server
|
||||
encode gzip
|
||||
|
||||
# Generate a random nonce for each request
|
||||
@html {
|
||||
path *.html
|
||||
}
|
||||
handle @html {
|
||||
header {
|
||||
+Content-Type "text/html; charset=utf-8"
|
||||
}
|
||||
templates
|
||||
}
|
||||
|
||||
# Security headers
|
||||
header {
|
||||
# Remove default Caddy headers
|
||||
|
@ -37,7 +26,7 @@
|
|||
Cross-Origin-Opener-Policy "same-origin"
|
||||
|
||||
# Simplified CSP for static content
|
||||
Content-Security-Policy "default-src 'none'; script-src 'self' 'nonce-{{.RandomString}}'; 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';"
|
||||
Content-Security-Policy "default-src 'none'; script-src 'self' 'unsafe-inline'; 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';"
|
||||
}
|
||||
|
||||
# Handle 404s
|
||||
|
|
|
@ -3,6 +3,8 @@ FROM caddy:2-alpine
|
|||
# Copy Caddyfile and static content
|
||||
COPY Caddyfile /etc/caddy/Caddyfile
|
||||
COPY index.html /srv/
|
||||
COPY theme.js /srv/
|
||||
COPY styles.css /srv/
|
||||
|
||||
# Expose port 8080
|
||||
EXPOSE 8080
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<meta name="description" content="Colin Knapp - Cybersecurity Expert and Software Developer Portfolio">
|
||||
<title>Colin Knapp Portfolio</title>
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
<script src="theme.js" nonce="{{.RandomString}}" crossorigin="anonymous"></script>
|
||||
<script src="theme.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="theme-switch">
|
||||
|
|
Loading…
Reference in New Issue