init commit
This commit is contained in:
33
lib/workload_service_web/endpoint.ex
Normal file
33
lib/workload_service_web/endpoint.ex
Normal file
@@ -0,0 +1,33 @@
|
||||
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 WorkloadServiceWeb.Router
|
||||
end
|
||||
Reference in New Issue
Block a user