Skip to content

Commit 2617a4e

Browse files
committed
15th commit
1 parent c48f063 commit 2617a4e

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

nginx.conf

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ http {
1212
keepalive_timeout 65;
1313
types_hash_max_size 2048;
1414

15+
# Rate limiting zone
16+
limit_req_zone $binary_remote_addr zone=one:10m rate=5r/s;
17+
1518
# Gzip compression (enhanced)
1619
gzip on;
1720
gzip_vary on;
@@ -29,9 +32,12 @@ http {
2932
image/svg+xml;
3033

3134
# Security headers
32-
add_header X-Frame-Options DENY;
33-
add_header X-Content-Type-Options nosniff;
35+
add_header X-Frame-Options "SAMEORIGIN";
36+
add_header X-Content-Type-Options "nosniff";
3437
add_header X-XSS-Protection "1; mode=block";
38+
add_header Referrer-Policy "no-referrer-when-downgrade";
39+
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
40+
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; object-src 'none';";
3541

3642
server {
3743
listen 5173;
@@ -62,6 +68,7 @@ http {
6268

6369
# Handle all other requests with SPA fallback
6470
location / {
71+
limit_req zone=one burst=10 nodelay;
6572
try_files $uri $uri/ /index.html;
6673

6774
# Don't cache the main index.html

0 commit comments

Comments
 (0)