diff options
| author | iCrawl <[email protected]> | 2020-12-24 20:16:00 +0100 |
|---|---|---|
| committer | iCrawl <[email protected]> | 2020-12-26 21:00:53 +0100 |
| commit | 5d2d46d8dca912614d6893a9f3ff30a487e76a77 (patch) | |
| tree | 7d45769f3c88aa6346483abcaa4370f67fced603 /docker/nginx/nginxconfig.io | |
| parent | Merge pull request #230 from WeebDev/fix/chunk-uploads (diff) | |
| download | host.fuwn.me-5d2d46d8dca912614d6893a9f3ff30a487e76a77.tar.xz host.fuwn.me-5d2d46d8dca912614d6893a9f3ff30a487e76a77.zip | |
add docker support
Diffstat (limited to 'docker/nginx/nginxconfig.io')
| -rw-r--r-- | docker/nginx/nginxconfig.io/general.conf | 18 | ||||
| -rw-r--r-- | docker/nginx/nginxconfig.io/proxy.conf | 18 | ||||
| -rw-r--r-- | docker/nginx/nginxconfig.io/security.conf | 12 |
3 files changed, 48 insertions, 0 deletions
diff --git a/docker/nginx/nginxconfig.io/general.conf b/docker/nginx/nginxconfig.io/general.conf new file mode 100644 index 0000000..a9df8d6 --- /dev/null +++ b/docker/nginx/nginxconfig.io/general.conf @@ -0,0 +1,18 @@ +# favicon.ico +location = /favicon.ico { + log_not_found off; + access_log off; +} + +# robots.txt +location = /robots.txt { + log_not_found off; + access_log off; +} + +# gzip +gzip on; +gzip_vary on; +gzip_proxied any; +gzip_comp_level 6; +gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml; diff --git a/docker/nginx/nginxconfig.io/proxy.conf b/docker/nginx/nginxconfig.io/proxy.conf new file mode 100644 index 0000000..874b041 --- /dev/null +++ b/docker/nginx/nginxconfig.io/proxy.conf @@ -0,0 +1,18 @@ +proxy_http_version 1.1; +proxy_cache_bypass $http_upgrade; + +# Proxy headers +proxy_set_header Upgrade $http_upgrade; +proxy_set_header Connection "upgrade"; +proxy_set_header Host $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; +proxy_set_header X-Forwarded-Host $host; +proxy_set_header X-Forwarded-Port $server_port; +proxy_set_header X-NginX-Proxy true; + +# Proxy timeouts +proxy_connect_timeout 60s; +proxy_send_timeout 60s; +proxy_read_timeout 60s; diff --git a/docker/nginx/nginxconfig.io/security.conf b/docker/nginx/nginxconfig.io/security.conf new file mode 100644 index 0000000..03b1ef6 --- /dev/null +++ b/docker/nginx/nginxconfig.io/security.conf @@ -0,0 +1,12 @@ +# 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' 'unsafe-eval'" always; +add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; + +# . files +location ~ /\.(?!well-known) { + deny all; +} |