Consistent intentation

This commit is contained in:
Mark Felder 2019-01-10 18:29:36 +00:00
parent fda942c329
commit efaa41fad2
1 changed files with 16 additions and 16 deletions

View File

@ -14,8 +14,8 @@ acl purge {
sub vcl_recv { sub vcl_recv {
# Redirect HTTP to HTTPS # Redirect HTTP to HTTPS
if (std.port(server.ip) != 443) { if (std.port(server.ip) != 443) {
set req.http.x-redir = "https://" + req.http.host + req.url; set req.http.x-redir = "https://" + req.http.host + req.url;
return (synth(750, "")); return (synth(750, ""));
} }
# CHUNKED SUPPORT # CHUNKED SUPPORT
@ -25,23 +25,23 @@ sub vcl_recv {
# Pipe if WebSockets request is coming through # Pipe if WebSockets request is coming through
if (req.http.upgrade ~ "(?i)websocket") { if (req.http.upgrade ~ "(?i)websocket") {
return (pipe); return (pipe);
} }
# Allow purging of the cache # Allow purging of the cache
if (req.method == "PURGE") { if (req.method == "PURGE") {
if (!client.ip ~ purge) { if (!client.ip ~ purge) {
return(synth(405,"Not allowed.")); return(synth(405,"Not allowed."));
} }
return(purge); return(purge);
} }
# Pleroma MediaProxy - strip headers that will affect caching # Pleroma MediaProxy - strip headers that will affect caching
if (req.url ~ "^/proxy/") { if (req.url ~ "^/proxy/") {
unset req.http.Cookie; unset req.http.Cookie;
unset req.http.Authorization; unset req.http.Authorization;
unset req.http.Accept; unset req.http.Accept;
return (hash); return (hash);
} }
# Strip headers that will affect caching from all other static content # Strip headers that will affect caching from all other static content
@ -86,9 +86,9 @@ sub vcl_backend_response {
# Do not cache redirects and errors # Do not cache redirects and errors
if ((beresp.status >= 300) && (beresp.status < 500)) { if ((beresp.status >= 300) && (beresp.status < 500)) {
set beresp.uncacheable = true; set beresp.uncacheable = true;
set beresp.ttl = 30s; set beresp.ttl = 30s;
return (deliver); return (deliver);
} }
# Pleroma MediaProxy internally sets headers properly # Pleroma MediaProxy internally sets headers properly
@ -118,8 +118,8 @@ sub vcl_synth {
# Ensure WebSockets through the pipe do not close prematurely # Ensure WebSockets through the pipe do not close prematurely
sub vcl_pipe { sub vcl_pipe {
if (req.http.upgrade) { if (req.http.upgrade) {
set bereq.http.upgrade = req.http.upgrade; set bereq.http.upgrade = req.http.upgrade;
set bereq.http.connection = req.http.connection; set bereq.http.connection = req.http.connection;
} }
} }