Some checks failed
Build and Publish / build-release (push) Failing after 6s
42 lines
820 B
Elixir
42 lines
820 B
Elixir
defmodule WorkloadServiceWeb.Endpoint do
|
|
use Phoenix.Endpoint, otp_app: :workload_service
|
|
|
|
@session_options [
|
|
store: :cookie,
|
|
key: "_workload_service_key",
|
|
signing_salt: "workload_salt",
|
|
same_site: "Lax"
|
|
]
|
|
|
|
plug(Plug.Static,
|
|
at: "/",
|
|
from: :workload_service,
|
|
gzip: false,
|
|
only: WorkloadServiceWeb.static_paths()
|
|
)
|
|
|
|
if code_reloading? do
|
|
plug(Phoenix.CodeReloader)
|
|
end
|
|
|
|
plug(Plug.RequestId)
|
|
plug(Plug.Telemetry, event_prefix: [:phoenix, :endpoint])
|
|
|
|
plug(Plug.Parsers,
|
|
parsers: [:urlencoded, :multipart, :json],
|
|
pass: ["*/*"],
|
|
json_decoder: Phoenix.json_library()
|
|
)
|
|
|
|
plug(Plug.MethodOverride)
|
|
plug(Plug.Head)
|
|
plug(Plug.Session, @session_options)
|
|
|
|
plug(CORSPlug,
|
|
origin: ["*"],
|
|
headers: ["*"]
|
|
)
|
|
|
|
plug(WorkloadServiceWeb.Router)
|
|
end
|