PERF: Have nginx cache and serve the service worker file.

This commit is contained in:
Guo Xiang Tan
2018-02-15 10:24:39 +08:00
parent d8b4627fc8
commit 28365f8ae5
5 changed files with 28 additions and 23 deletions

View File

@@ -188,7 +188,7 @@ server {
# This big block is needed so we can selectively enable
# acceleration for backups and avatars
# see note about repetition above
location ~ ^/(letter_avatar/|user_avatar|highlight-js|stylesheets|favicon/proxied) {
location ~ ^/(letter_avatar/|user_avatar|highlight-js|stylesheets|favicon/proxied|service-worker-.*.js) {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;