X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=installation%2Fpleroma.vcl;h=5d80c6f44f9b760bc25d251bf04f2b9e2fb0fd37;hb=331cf6ada1e4df51b366c79126e094ee335dd684;hp=f3faa943268ce95d425bb840ab660a370f193dfd;hpb=8dbb4c6c50a5308f4f41c59b562ed8f344648d0e;p=akkoma diff --git a/installation/pleroma.vcl b/installation/pleroma.vcl index f3faa9432..5d80c6f44 100644 --- a/installation/pleroma.vcl +++ b/installation/pleroma.vcl @@ -41,7 +41,7 @@ sub vcl_recv { # Strip headers that will affect caching from all other static content # This also permits caching of individual toots and AP Activities - if ((req.url ~ "^/(media|notice|static)/") || + if ((req.url ~ "^/(media|static)/") || (req.url ~ "(?i)\.(html|js|css|jpg|jpeg|png|gif|gz|tgz|bz2|tbz|mp3|ogg|svg|swf|ttf|pdf|woff|woff2)$")) { unset req.http.Cookie; @@ -93,8 +93,7 @@ sub vcl_backend_response { # Strip cache-restricting headers from Pleroma on static content that we want to cache # Also enable streaming of cached content to clients (no waiting for Varnish to complete backend fetch) - if ((bereq.url ~ "^/(notice)/") || - (bereq.url ~ "(?i)\.(js|css|jpg|jpeg|png|gif|gz|tgz|bz2|tbz|mp3|ogg|svg|swf|ttf|pdf|woff|woff2)$")) + if (bereq.url ~ "(?i)\.(js|css|jpg|jpeg|png|gif|gz|tgz|bz2|tbz|mp3|ogg|svg|swf|ttf|pdf|woff|woff2)$") { unset beresp.http.set-cookie; unset beresp.http.Cache-Control; @@ -120,3 +119,8 @@ sub vcl_pipe { set bereq.http.connection = req.http.connection; } } + +sub vcl_deliver { + # Uncomment this only after you get HTTPS working. + # set resp.http.Strict-Transport-Security= "max-age=31536000; includeSubDomains"; +}