Created
June 12, 2019 04:26
-
-
Save mix5003/0aff8719804494530790276406499e8c to your computer and use it in GitHub Desktop.
(net tested) another way to force user to reload new module
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
| server { | |
| listen 80; | |
| server_name localhost; | |
| root /usr/share/nginx/html; | |
| keepalive_timeout 620s; | |
| location / { | |
| try_files $uri /index.html; | |
| add_header 'Cache-Control' 'no-cache, must-revalidate, max-age=0'; | |
| expires off; | |
| gzip_static on; | |
| gzip on; | |
| gzip_disable "msie6"; | |
| gzip_vary on; | |
| gzip_comp_level 6; | |
| gzip_proxied any; | |
| gzip_http_version 1.1; | |
| } | |
| location ~* ^.+\.js$ { | |
| try_files $uri /reload.js; | |
| expires 30d; | |
| gzip_static on; | |
| gzip on; | |
| gzip_disable "msie6"; | |
| gzip_vary on; | |
| gzip_proxied any; | |
| gzip_comp_level 6; | |
| gzip_buffers 16 8k; | |
| gzip_http_version 1.1; | |
| gzip_min_length 1000; | |
| gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon; | |
| } | |
| location ~* ^.+\.(jpg|jpeg|gif|mp3|png|avi|vob|mpg|mpeg|mp4|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|txt|ttf|woff2|wotff|eot|svg)$ { | |
| try_files $uri /index.html; | |
| expires 30d; | |
| gzip_static on; | |
| gzip on; | |
| gzip_disable "msie6"; | |
| gzip_vary on; | |
| gzip_proxied any; | |
| gzip_comp_level 6; | |
| gzip_buffers 16 8k; | |
| gzip_http_version 1.1; | |
| gzip_min_length 1000; | |
| gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon; | |
| } | |
| error_page 500 502 503 504 /50x.html; | |
| location = /50x.html { | |
| root /usr/share/nginx/html; | |
| } | |
| } |
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
| location.reload(true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment