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 at: "/", from: :pleroma,
14 only: ~w(index.html static finmoji)
16 # Code reloading can be explicitly enabled under the
17 # :code_reloader configuration of your endpoint.
19 plug Phoenix.CodeReloader
22 plug TrailingFormatPlug
27 parsers: [:urlencoded, :multipart, :json],
31 plug Plug.MethodOverride
34 # The session will be stored in the cookie and signed,
35 # this means its contents can be read but not tampered with.
36 # Set :encryption_salt if you would also like to encrypt it.
40 signing_salt: "CqaoopA2"
42 plug Pleroma.Web.Router
45 Dynamically loads configuration from the system environment
48 It receives the endpoint configuration from the config files
49 and must return the updated configuration.
51 def load_from_system_env(config) do
52 port = System.get_env("PORT") || raise "expected the PORT environment variable to be set"
53 {:ok, Keyword.put(config, :http, [:inet6, port: port])}