summaryrefslogtreecommitdiff
path: root/installation/pleroma.vcl
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2020-10-05 12:40:53 -0500
committerMark Felder <feld@FreeBSD.org>2020-10-05 12:40:53 -0500
commit346cc3ac244384d37d1bcbbe888173725465a307 (patch)
tree61947d678e4f0a1be1a71e68f0bf4f03301eb725 /installation/pleroma.vcl
parent3f201475e099aecf0c77ca5396b114433ea58224 (diff)
parent4b05eb9a321ebdc03588f786683e83427fe31f1c (diff)
downloadpleroma-346cc3ac244384d37d1bcbbe888173725465a307.tar.gz
pleroma-346cc3ac244384d37d1bcbbe888173725465a307.zip
Merge branch 'develop' into feature/1893-remote-emoji-packs-pagination
Diffstat (limited to 'installation/pleroma.vcl')
-rw-r--r--installation/pleroma.vcl6
1 files changed, 5 insertions, 1 deletions
diff --git a/installation/pleroma.vcl b/installation/pleroma.vcl
index 154747aa6..13dad784c 100644
--- a/installation/pleroma.vcl
+++ b/installation/pleroma.vcl
@@ -1,3 +1,4 @@
+# Recommended varnishncsa logging format: '%h %l %u %t "%m %{X-Forwarded-Proto}i://%{Host}i%U%q %H" %s %b "%{Referer}i" "%{User-agent}i"'
vcl 4.1;
import std;
@@ -14,8 +15,11 @@ acl purge {
sub vcl_recv {
# Redirect HTTP to HTTPS
if (std.port(server.ip) != 443) {
+ set req.http.X-Forwarded-Proto = "http";
set req.http.x-redir = "https://" + req.http.host + req.url;
return (synth(750, ""));
+ } else {
+ set req.http.X-Forwarded-Proto = "https";
}
# CHUNKED SUPPORT
@@ -105,7 +109,7 @@ sub vcl_hash {
sub vcl_backend_fetch {
# Be more lenient for slow servers on the fediverse
- if bereq.url ~ "^/proxy/" {
+ if (bereq.url ~ "^/proxy/") {
set bereq.first_byte_timeout = 300s;
}