diff options
author | eugenijm <eugenijm@protonmail.com> | 2021-01-21 14:58:18 +0300 |
---|---|---|
committer | eugenijm <eugenijm@protonmail.com> | 2021-01-21 21:55:23 +0300 |
commit | 7fcaa188a0be4bc8e41790ddda9b6789cb318347 (patch) | |
tree | bf0701de8ac6c04bc131b04d0662c7604494888d /test | |
parent | 133644dfa2e46dc48980ae6f835b7aa2758b4250 (diff) | |
download | pleroma-7fcaa188a0be4bc8e41790ddda9b6789cb318347.tar.gz |
Allow to define custom HTTP headers per each frontend
Diffstat (limited to 'test')
-rw-r--r-- | test/pleroma/web/plugs/http_security_plug_test.exs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/pleroma/web/plugs/http_security_plug_test.exs b/test/pleroma/web/plugs/http_security_plug_test.exs index 26c9fd317..4e7befdd5 100644 --- a/test/pleroma/web/plugs/http_security_plug_test.exs +++ b/test/pleroma/web/plugs/http_security_plug_test.exs @@ -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") == ["/"] |