aboutsummaryrefslogtreecommitdiff
path: root/docker/nginx/nginxconfig.io
diff options
context:
space:
mode:
authorPitu <[email protected]>2021-01-04 01:04:20 +0900
committerPitu <[email protected]>2021-01-04 01:04:20 +0900
commitfcd39dc550dec8dbcb8325e07e938c5024cbc33d (patch)
treef41acb4e0d5fd3c3b1236fe4324b3fef9ec6eafe /docker/nginx/nginxconfig.io
parentCreate FUNDING.yml (diff)
parentchore: update todo (diff)
downloadhost.fuwn.me-fcd39dc550dec8dbcb8325e07e938c5024cbc33d.tar.xz
host.fuwn.me-fcd39dc550dec8dbcb8325e07e938c5024cbc33d.zip
Merge branch 'dev'
Diffstat (limited to 'docker/nginx/nginxconfig.io')
-rw-r--r--docker/nginx/nginxconfig.io/general.conf18
-rw-r--r--docker/nginx/nginxconfig.io/proxy.conf18
-rw-r--r--docker/nginx/nginxconfig.io/security.conf12
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;
+}