由于“ /etc/nginx/nginx.conf:69”中的“ nginx:[emerg]无效参数“ unsafe-inline”无效”,我无法重新加载我的nginx.config。
我尝试了其他参数,但是第69行始终存在错误,我看不到它。
add_header Content-Security-Policy
default-src 'unsafe-inline';
script-src 'unsafe-inline' 'sha256-3880ce6a4d79d208d053747c5551687f8b44f285ad219ef2bd501c121159eb48' "cdnjs.cloudflare.com" "kit.fontawesome.com" "cdn.mouseflow.com";
img-src 'self' "images.unsplash.com";
style-src 'sha256-3880ce6a4d79d208d053747c5551687f8b44f285ad219ef2bd501c121159eb48' "cdnjs.cloudflare.com";
font-src 'self' "fonts.googleapis.com";
media-src 'self' "*.vimeo.com";
object-src 'none';
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Xss-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
I expect the config to validate and reload.