aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/reverse_proxy.ex
diff options
context:
space:
mode:
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>2019-03-05 05:37:33 +0100
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2019-03-13 04:26:56 +0100
commitc42d34b2ec2dacd9a038f721f7a817ee43cc0a4f (patch)
tree7f658bf7c31adfd5ea4726f90124193213deddf7 /lib/pleroma/reverse_proxy.ex
parent8cd3eada7dec00f4e2ddd24c6a4286a4450281c1 (diff)
downloadpleroma-c42d34b2ec2dacd9a038f721f7a817ee43cc0a4f.tar.gz
[Credo] fix Credo.Check.Readability.MaxLineLength
Diffstat (limited to 'lib/pleroma/reverse_proxy.ex')
-rw-r--r--lib/pleroma/reverse_proxy.ex10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/pleroma/reverse_proxy.ex b/lib/pleroma/reverse_proxy.ex
index a25b5ea4e..6298b92f4 100644
--- a/lib/pleroma/reverse_proxy.ex
+++ b/lib/pleroma/reverse_proxy.ex
@@ -3,10 +3,12 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.ReverseProxy do
- @keep_req_headers ~w(accept user-agent accept-encoding cache-control if-modified-since if-unmodified-since if-none-match if-range range)
+ @keep_req_headers ~w(accept user-agent accept-encoding cache-control if-modified-since) ++
+ ~w(if-unmodified-since if-none-match if-range range)
@resp_cache_headers ~w(etag date last-modified cache-control)
@keep_resp_headers @resp_cache_headers ++
- ~w(content-type content-disposition content-encoding content-range accept-ranges vary)
+ ~w(content-type content-disposition content-encoding content-range) ++
+ ~w(accept-ranges vary)
@default_cache_control_header "public, max-age=1209600"
@valid_resp_codes [200, 206, 304]
@max_read_duration :timer.seconds(30)
@@ -282,8 +284,8 @@ defmodule Pleroma.ReverseProxy do
headers
has_cache? ->
- # There's caching header present but no cache-control -- we need to explicitely override it to public
- # as Plug defaults to "max-age=0, private, must-revalidate"
+ # There's caching header present but no cache-control -- we need to explicitely override it
+ # to public as Plug defaults to "max-age=0, private, must-revalidate"
List.keystore(headers, "cache-control", 0, {"cache-control", "public"})
true ->