Revert "FEATURE: Normalize the service worker route (#8359)"

This reverts commit 9799a651b6.
This commit is contained in:
Jeff Wong
2019-11-20 14:10:17 -08:00
parent 0b284d3d8b
commit c6d8dbd4a9
4 changed files with 4 additions and 31 deletions

View File

@@ -33,13 +33,6 @@ map $http_x_forwarded_proto $thescheme {
log_format log_discourse '[$time_local] "$http_host" $remote_addr "$request" "$http_user_agent" "$sent_http_x_discourse_route" $status $bytes_sent "$http_referer" $upstream_response_time $request_time "$sent_http_x_discourse_username"';
# Allow bypass cache from localhost
geo $bypass_cache {
default 0;
127.0.0.1 1;
::1 1;
}
server {
access_log /var/log/nginx/access.log log_discourse;
@@ -231,15 +224,6 @@ server {
proxy_cache_valid 200 301 302 7d;
proxy_cache_valid any 1m;
proxy_pass http://discourse;
# Allow service worker cache to be re-cached by localhost requests only
# Forward public cache control
location ~ ^/service-worker {
proxy_cache_bypass $bypass_cache;
proxy_hide_header "Cache-Control";
add_header Cache-Control max-age=31556952,public;
proxy_pass http://discourse;
}
break;
}