* Initial plan * fix: add CSP hash for blocked inline style in style-src directive Agent-Logs-Url: https://github.com/RMCampos/tasknote/sessions/a51fd5ff-eb93-4ef0-96e0-3d10df540a59 Co-authored-by: RMCampos <2219519+RMCampos@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: RMCampos <2219519+RMCampos@users.noreply.github.com>
62 lines
1.4 KiB
Caddyfile
62 lines
1.4 KiB
Caddyfile
{
|
|
auto_https off
|
|
admin off
|
|
}
|
|
|
|
:5000 {
|
|
root * /app/dist
|
|
|
|
encode gzip
|
|
|
|
log {
|
|
output stdout
|
|
format console {
|
|
time_format iso8601
|
|
level_format color
|
|
}
|
|
level "INFO"
|
|
}
|
|
|
|
header {
|
|
X-Frame-Options "SAMEORIGIN"
|
|
X-XSS-Protection "1;mode=block"
|
|
Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate"
|
|
X-Content-Type-Options "nosniff"
|
|
Strict-Transport-Security "max-age=31536000"
|
|
Content-Security-Policy "
|
|
base-uri 'self';
|
|
connect-src 'self' {$VITE_BACKEND_SERVER};
|
|
default-src 'self' data:;
|
|
font-src 'self' https://fonts.gstatic.com/ https://cdn.jsdelivr.net/;
|
|
frame-src 'self';
|
|
img-src 'self' data: https://gravatar.com/;
|
|
manifest-src 'self';
|
|
media-src 'self';
|
|
object-src 'none';
|
|
script-src 'unsafe-inline' 'report-sample' 'self' https://*.cloudfront.net;
|
|
style-src 'report-sample' 'self' https://cdn.jsdelivr.net/ https://fonts.googleapis.com 'sha256-+OsIn6RhyCZCUkkvtHxFtP0kU3CGdGeLjDd9Fzqdl3o=';
|
|
worker-src 'none';
|
|
"
|
|
Referrer-Policy "same-origin"
|
|
}
|
|
|
|
handle /env.js {
|
|
header Content-Type "text/javascript"
|
|
respond `window.config = {"VITE_BACKEND_SERVER":"{$VITE_BACKEND_SERVER}","VITE_BUILD":"{$VITE_BUILD}"};`
|
|
}
|
|
|
|
handle /favicon.ico {
|
|
file_server
|
|
}
|
|
|
|
file_server
|
|
|
|
handle_errors {
|
|
@404 {
|
|
expression {http.error.status_code} == 404
|
|
}
|
|
rewrite @404 /
|
|
file_server
|
|
}
|
|
}
|