Skip to content

Commit

Permalink
Fixed Swagger CDN access error
Browse files Browse the repository at this point in the history
  • Loading branch information
Kseen715 committed Dec 1, 2024
1 parent 756a572 commit 10b6f54
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,22 @@ server {
listen 80;

# Add Content Security Policy headers
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data:; connect-src 'self' ws: wss:; frame-ancestors 'none'; base-uri 'self'; form-action 'self';" always;
add_header Content-Security-Policy "
default-src 'self';
img-src 'self' data: https:;
script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.jsdelivr.net;
style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net;
font-src 'self' data:;
connect-src 'self' ws: wss:;
frame-ancestors 'none';
base-uri 'self';
form-action 'self';
" always;

# Add other security headers
add_header X-Frame-Options "DENY" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;

location / {
Expand Down

0 comments on commit 10b6f54

Please sign in to comment.