| OLD | NEW |
| 1 gzip on; | |
| 2 gzip_min_length 1000; | |
| 3 gzip_types application/json text/css application/x-javascript; | |
| 4 | |
| 5 sendfile on; | |
| 6 keepalive_timeout 65; | |
| 7 | |
| 8 location / | 1 location / |
| 9 { | 2 { |
| 10 root /opt/discourse/public; | |
| 11 | |
| 12 location ~ ^/t\/[0-9]+\/[0-9]+\/avatar | |
| 13 { | |
| 14 expires 1d; | |
| 15 add_header Cache-Control public; | |
| 16 add_header ETag ""; | |
| 17 } | |
| 18 | |
| 19 location ~ ^/assets/ | |
| 20 { | |
| 21 expires 1y; | |
| 22 add_header Cache-Control public; | |
| 23 add_header ETag ""; | |
| 24 break; | |
| 25 } | |
| 26 | |
| 27 # If the file exists as a static file serve it directly without | |
| 28 # running all the other rewite tests on it | |
| 29 if (-f $request_filename) | |
| 30 { | |
| 31 break; | |
| 32 } | |
| 33 | |
| 34 proxy_set_header X-Real-IP $remote_addr; | 3 proxy_set_header X-Real-IP $remote_addr; |
| 35 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | 4 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 36 proxy_set_header X-Forwarded-Proto $scheme; | 5 proxy_set_header X-Forwarded-Proto $scheme; |
| 37 proxy_set_header Host $http_host; | 6 proxy_set_header Host $http_host; |
| 38 if (!-f $request_filename) | 7 proxy_http_version 1.1; |
| 39 { | 8 proxy_pass http://unix:/var/discourse/shared/standalone/nginx.http.sock:; |
| 40 proxy_pass http://discourse; | |
| 41 break; | |
| 42 } | |
| 43 } | 9 } |
| OLD | NEW |