Skip to content

Commit

Permalink
Merge pull request #25 from Star-Academy/fixcicd
Browse files Browse the repository at this point in the history
fix: fix nginx config
  • Loading branch information
msm1984 authored Aug 27, 2024
2 parents ef6873c + c327003 commit 97e8859
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,25 @@ http {
error_log /dev/null;

# Load configs
# security headers
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "no-referrer-when-downgrade" always;
add_header Content-Security-Policy "default-src 'self' http: https: ws: wss: data: blob: 'unsafe-inline'; frame-ancestors 'self';" always;
add_header Permissions-Policy "interest-cohort=()" always;

# . files
location ~ /\.(?!well-known) {
deny all;
}

server {
listen 80;
listen [::]:80;
server_name example.com;
root /usr/share/nginx/html;
index index.csr.html;

# security
include nginxconfig.io/security.conf;
# security headers
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "no-referrer-when-downgrade" always;
add_header Content-Security-Policy "default-src 'self' http: https: ws: wss: data: blob: 'unsafe-inline'; frame-ancestors 'self';" always;
add_header Permissions-Policy "interest-cohort=()" always;

# . files
location ~ /\.(?!well-known) {
deny all;
}

# logging
access_log /var/log/nginx/access.log combined buffer=512k flush=1m;
Expand Down

0 comments on commit 97e8859

Please sign in to comment.