about summary refs log tree commit diff
path: root/nanobox/nginx-local.conf
diff options
context:
space:
mode:
authorReverite <github@reverite.sh>2019-06-16 18:19:10 -0700
committerReverite <github@reverite.sh>2019-06-16 18:19:10 -0700
commit9fbb4af7611aa7836e65ef9f544d341423c15685 (patch)
tree0841c6bcdd55a55d167838e4c9f101a7737b8201 /nanobox/nginx-local.conf
parent44cbee455d129636c55ec0ccc2b79373e194ffce (diff)
parentf57a0f89a8b2b894d028de8e75caddcf3a8c904e (diff)
Merge branch 'glitch'
Diffstat (limited to 'nanobox/nginx-local.conf')
-rw-r--r--nanobox/nginx-local.conf20
1 files changed, 17 insertions, 3 deletions
diff --git a/nanobox/nginx-local.conf b/nanobox/nginx-local.conf
index c0e883603..37c8a451a 100644
--- a/nanobox/nginx-local.conf
+++ b/nanobox/nginx-local.conf
@@ -10,10 +10,13 @@ http {
     sendfile on;
 
     gzip on;
-    gzip_http_version 1.0;
+    gzip_disable "MSIE [1-6]\.";
+    gzip_vary on;
     gzip_proxied any;
+    gzip_comp_level 6;
+    gzip_buffers 16 8k;
     gzip_min_length 500;
-    gzip_disable "MSIE [1-6]\.";
+    gzip_http_version 1.1;
     gzip_types text/plain text/xml text/javascript text/css text/comma-separated-values application/xml+rss application/xml application/x-javascript application/json application/javascript application/atom+xml;
 
     # Proxy upstream to the puma process
@@ -36,9 +39,12 @@ http {
         # Listen on port 8080
         listen 8080;
 
+        keepalive_timeout    70;
+        client_max_body_size 80M;
+
         root /app/public;
 
-        client_max_body_size 80M;
+        add_header Strict-Transport-Security "max-age=31536000";
 
         location / {
             try_files $uri @rails;
@@ -47,6 +53,10 @@ http {
         # Proxy connections to rails
         location @rails {
             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 https;
+            proxy_set_header Proxy "";
             proxy_pass_header Server;
 
             proxy_pass http://rails;
@@ -62,6 +72,10 @@ http {
         # Proxy connections to node
         location /api/v1/streaming {
             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 https;
+            proxy_set_header Proxy "";
 
             proxy_pass http://node;
             proxy_buffering off;