Fix Docker configuration to include theme.js and styles.css files
ci/woodpecker/push/woodpecker Pipeline failed
Details
ci/woodpecker/push/woodpecker Pipeline failed
Details
This commit is contained in:
parent
1c328df0c7
commit
71e142b82e
|
@ -3,17 +3,6 @@
|
||||||
file_server
|
file_server
|
||||||
encode gzip
|
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
|
# Security headers
|
||||||
header {
|
header {
|
||||||
# Remove default Caddy headers
|
# Remove default Caddy headers
|
||||||
|
@ -37,7 +26,7 @@
|
||||||
Cross-Origin-Opener-Policy "same-origin"
|
Cross-Origin-Opener-Policy "same-origin"
|
||||||
|
|
||||||
# Simplified CSP for static content
|
# 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
|
# Handle 404s
|
||||||
|
|
|
@ -3,6 +3,8 @@ FROM caddy:2-alpine
|
||||||
# Copy Caddyfile and static content
|
# Copy Caddyfile and static content
|
||||||
COPY Caddyfile /etc/caddy/Caddyfile
|
COPY Caddyfile /etc/caddy/Caddyfile
|
||||||
COPY index.html /srv/
|
COPY index.html /srv/
|
||||||
|
COPY theme.js /srv/
|
||||||
|
COPY styles.css /srv/
|
||||||
|
|
||||||
# Expose port 8080
|
# Expose port 8080
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<meta name="description" content="Colin Knapp - Cybersecurity Expert and Software Developer Portfolio">
|
<meta name="description" content="Colin Knapp - Cybersecurity Expert and Software Developer Portfolio">
|
||||||
<title>Colin Knapp Portfolio</title>
|
<title>Colin Knapp Portfolio</title>
|
||||||
<link rel="stylesheet" href="styles.css">
|
<link rel="stylesheet" href="styles.css">
|
||||||
<script src="theme.js" nonce="{{.RandomString}}" crossorigin="anonymous"></script>
|
<script src="theme.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="theme-switch">
|
<div class="theme-switch">
|
||||||
|
|
Loading…
Reference in New Issue