Allow to define custom HTTP headers per each frontend
This commit is contained in:
parent
133644dfa2
commit
7fcaa188a0
5 changed files with 39 additions and 15 deletions
|
|
@ -75,7 +75,14 @@ defmodule Pleroma.Web.Plugs.HTTPSecurityPlugTest do
|
|||
|
||||
test "it sets the Service-Worker-Allowed header", %{conn: conn} do
|
||||
clear_config([:http_security, :enabled], true)
|
||||
clear_config([:http_security, :service_worker_allowed], "/")
|
||||
clear_config([:frontends, :primary], %{"name" => "fedi-fe", "ref" => "develop"})
|
||||
|
||||
clear_config([:frontends, :available], %{
|
||||
"fedi-fe" => %{
|
||||
"name" => "fedi-fe",
|
||||
"custom-http-headers" => [{"service-worker-allowed", "/"}]
|
||||
}
|
||||
})
|
||||
|
||||
conn = get(conn, "/api/v1/instance")
|
||||
assert Conn.get_resp_header(conn, "service-worker-allowed") == ["/"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue