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 /config | |
parent | 133644dfa2e46dc48980ae6f835b7aa2758b4250 (diff) |
Allow to define custom HTTP headers per each frontend
Diffstat (limited to 'config')
-rw-r--r-- | config/config.exs | 5 | ||||
-rw-r--r-- | config/description.exs | 14 |
2 files changed, 10 insertions, 9 deletions
diff --git a/config/config.exs b/config/config.exs index c4a690799..fbaf9a7b5 100644 --- a/config/config.exs +++ b/config/config.exs @@ -723,7 +723,10 @@ config :pleroma, :frontends, "git" => "https://git.pleroma.social/pleroma/fedi-fe", "build_url" => "https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build", - "ref" => "master" + "ref" => "master", + "custom-http-headers" => [ + {"service-worker-allowed", "/"} + ] }, "admin-fe" => %{ "name" => "admin-fe", diff --git a/config/description.exs b/config/description.exs index 0580be09a..2de2e1947 100644 --- a/config/description.exs +++ b/config/description.exs @@ -60,6 +60,12 @@ frontend_options = [ label: "Build directory", type: :string, description: "The directory inside the zip file " + }, + %{ + key: "custom-http-headers", + label: "Custom HTTP headers", + type: {:list, :string}, + description: "The custom HTTP headers for the frontend" } ] @@ -1749,14 +1755,6 @@ config :pleroma, :config_description, [ type: :string, description: "Adds the specified URL to report-uri and report-to group in CSP header", suggestions: ["https://example.com/report-uri"] - }, - %{ - key: :service_worker_allowed, - label: "The Service-Worker-Allowed header", - type: :string, - description: - "Sets the Service-Worker-Allowed header which limits the maximum allowed Service Worker scope", - suggestions: ["/"] } ] }, |