forked from mathialm/secfit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
122 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,33 +1,72 @@ | ||
| # Security headers | ||
| add_header X-Frame-Options "SAMEORIGIN" always; | ||
| 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: data: blob: 'unsafe-inline'" always; | ||
|
|
||
| # Rate limiting | ||
| limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s; | ||
|
|
||
| server { | ||
| listen 80; | ||
| server_name _; | ||
|
|
||
| # Rate limiting | ||
| limit_req zone=one burst=10 nodelay; | ||
|
|
||
| location / { | ||
| proxy_pass http://0.0.0.0:23/; | ||
| proxy_pass http://127.0.0.1:23/; | ||
| proxy_set_header Host $http_host; | ||
| proxy_set_header X-Real-IP $remote_addr; | ||
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
| proxy_set_header X-Forwarded-Proto $scheme; | ||
|
|
||
| # Timeouts | ||
| proxy_connect_timeout 60s; | ||
| proxy_send_timeout 60s; | ||
| proxy_read_timeout 60s; | ||
| } | ||
| } | ||
|
|
||
| server { | ||
| listen 217; | ||
| server_name _; | ||
|
|
||
| # Rate limiting | ||
| limit_req zone=one burst=10 nodelay; | ||
|
|
||
| location / { | ||
| proxy_pass http://0.0.0.0:21/; | ||
| proxy_pass http://127.0.0.1:21/; | ||
| proxy_set_header Host $http_host; | ||
| proxy_set_header X-Real-IP $remote_addr; | ||
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
| proxy_set_header X-Forwarded-Proto $scheme; | ||
|
|
||
| # Timeouts | ||
| proxy_connect_timeout 60s; | ||
| proxy_send_timeout 60s; | ||
| proxy_read_timeout 60s; | ||
| } | ||
| } | ||
|
|
||
| server { | ||
| listen 227; | ||
| server_name _; | ||
|
|
||
| # Rate limiting | ||
| limit_req zone=one burst=10 nodelay; | ||
|
|
||
| location / { | ||
| proxy_pass http://0.0.0.0:22/; | ||
| proxy_pass http://127.0.0.1:22/; | ||
| proxy_set_header Host $http_host; | ||
| proxy_set_header X-Real-IP $remote_addr; | ||
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
| proxy_set_header X-Forwarded-Proto $scheme; | ||
|
|
||
| # Timeouts | ||
| proxy_connect_timeout 60s; | ||
| proxy_send_timeout 60s; | ||
| proxy_read_timeout 60s; | ||
| } | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters