mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Revert "FEATURE: Normalize the service worker route (#8359)"
This reverts commit 9799a651b6.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user