Created
July 20, 2019 18:21
-
-
Save Xarrow/4148c17870e5bb0d93086ca3ad0deec8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # 46789 http://127.0.0.1:46789/ | |
| server{ | |
| set $simplebox "simplebox"; | |
| listen 46789 fastopen=5; | |
| server_name 127.0.0.1; | |
| resolver 8.8.8.8; | |
| #ssl_certificate /etc/nginx/sites-available/ssl/server.crt; | |
| #ssl_certificate_key /etc/nginx/sites-available/ssl/server.key; | |
| # ssl_certificate /etc/letsencrypt/live/helixcs.tk/fullchain.pem; | |
| # ssl_certificate_key /etc/letsencrypt/live/helixcs.tk/privkey.pem; | |
| # ssl_dhparam /etc/letsencrypt/live/dhparams.pem; | |
| # ssl_trusted_certificate /etc/letsencrypt/live/helixcs.tk/fullchain.pem; | |
| location / { | |
| # reference at https://docs.nginx.com/nginx/admin-guide/content-cache/content-caching/ | |
| proxy_cache proxycache; | |
| proxy_cache_methods GET HEAD; | |
| # $request_uri and $uri | |
| proxy_cache_key "$host$request_uri"; | |
| proxy_cache_valid 304 2h; | |
| proxy_cache_valid 403 444 2h; | |
| proxy_cache_valid 404 2h; | |
| proxy_cache_valid 500 502 2h; | |
| proxy_cache_use_stale invalid_header http_404 http_500 http_502; | |
| proxy_cache_lock on; | |
| proxy_cache_lock_timeout 5s; | |
| expires 7d; | |
| rewrite ^/?(.*)$ /$1 break; | |
| proxy_set_header Host "firebasestorage.googleapis.com"; | |
| proxy_set_header Referer "https://console.firebase.google.com/"; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-Proto $scheme; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_pass https://firebasestorage.googleapis.com; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment