Packages

A Fair Source multi-agent runtime with deterministic agent scoring and replayable run history.

Retired package: Deprecated - superseded — operator console moved to the Syntropy app

Current section

Files

Jump to
syntropy lib syntropy_web endpoint.ex
Raw

lib/syntropy_web/endpoint.ex

defmodule SyntropyWeb.Endpoint do
use Phoenix.Endpoint, otp_app: :syntropy
@session_options [
store: :cookie,
key: "_syntropy_key",
signing_salt: "syntropy-cookie"
]
socket "/live", Phoenix.LiveView.Socket, websocket: [connect_info: [session: @session_options]]
socket "/socket", SyntropyWeb.ApiSocket, websocket: true, longpoll: false
plug Plug.Static,
at: "/vendor/phoenix",
from: {:phoenix, "priv/static"},
gzip: false,
only: ~w(phoenix.mjs phoenix.mjs.map)
plug Plug.Static,
at: "/vendor/phoenix_live_view",
from: {:phoenix_live_view, "priv/static"},
gzip: false,
only: ~w(phoenix_live_view.esm.js phoenix_live_view.esm.js.map)
plug Plug.Static, at: "/", from: :syntropy, gzip: false
if code_reloading? do
plug Phoenix.LiveReloader
plug Phoenix.CodeReloader
end
plug Plug.RequestId
plug Plug.Telemetry, event_prefix: [:phoenix, :endpoint]
# 1 MB request body cap: the largest legitimate payloads (source-review
# bundles) stay well under this, and it bounds memory per connection.
plug Plug.Parsers,
parsers: [:urlencoded, :multipart, :json],
pass: ["*/*"],
length: 1_048_576,
json_decoder: Phoenix.json_library()
plug Plug.MethodOverride
plug Plug.Head
plug Plug.Session, @session_options
plug SyntropyWeb.Router
end