add corsplug
All checks were successful
Build and Publish / build-release (push) Successful in 1m12s

This commit is contained in:
2026-05-13 17:57:24 -05:00
parent 39f5671b2c
commit cd0c0b21b4
2 changed files with 3 additions and 17 deletions

View File

@@ -25,8 +25,7 @@ defmodule PolicyServiceWeb.Endpoint do
from: :policy_service,
gzip: not code_reloading?,
only: PolicyServiceWeb.static_paths(),
raise_on_missing_only: code_reloading?,
headers: %{"Access-Control-Allow-Origin" => "*"}
raise_on_missing_only: code_reloading?
# Code reloading can be explicitly enabled under the
# :code_reloader configuration of your endpoint.
@@ -43,6 +42,7 @@ defmodule PolicyServiceWeb.Endpoint do
pass: ["*/*"],
json_decoder: Phoenix.json_library()
plug CORSPlug
plug Plug.MethodOverride
plug Plug.Head
plug Plug.Session, @session_options