1 defmodule Pleroma.Web.Endpoint do
2 use Phoenix.Endpoint, otp_app: :pleroma
4 socket "/socket", Pleroma.Web.UserSocket
6 # Serve at "/" the static files from "priv/static" directory.
8 # You should set gzip to true if you are running phoenix.digest
9 # when deploying your static files in production.
11 at: "/media", from: "uploads", gzip: false
13 # Code reloading can be explicitly enabled under the
14 # :code_reloader configuration of your endpoint.
16 plug Phoenix.CodeReloader
19 plug TrailingFormatPlug
24 parsers: [:urlencoded, :multipart, :json],
28 plug Plug.MethodOverride
31 # The session will be stored in the cookie and signed,
32 # this means its contents can be read but not tampered with.
33 # Set :encryption_salt if you would also like to encrypt it.
37 signing_salt: "CqaoopA2"
39 plug Pleroma.Web.Router
42 Dynamically loads configuration from the system environment
45 It receives the endpoint configuration from the config files
46 and must return the updated configuration.
48 def load_from_system_env(config) do
49 port = System.get_env("PORT") || raise "expected the PORT environment variable to be set"
50 {:ok, Keyword.put(config, :http, [:inet6, port: port])}