Current section
Files
Jump to
Current section
Files
lib/plato/web/endpoint.ex
defmodule Plato.Web.Endpoint do
@moduledoc """
The endpoint for Plato's web interface.
"""
use Phoenix.Endpoint, otp_app: :plato
# Code reloading can be explicitly enabled under the
# :code_reloader configuration of your endpoint.
if code_reloading? do
plug(Phoenix.CodeReloader)
if Code.ensure_loaded?(Phoenix.LiveReload) do
plug(Phoenix.LiveReload)
end
end
plug(Plug.Static,
at: "/",
from: :plato,
gzip: false
)
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,
store: :cookie,
key: "_plato_key",
signing_salt: "plato_signing_salt"
)
plug(Plato.Web.Router)
end