diff options
author | Jordan Bracco <href@random.sh> | 2022-12-20 00:21:54 +0000 |
---|---|---|
committer | Jordan Bracco <href@random.sh> | 2022-12-20 19:29:41 +0100 |
commit | 2d83df8b32bff7f0028923bb5b64dc0b55f20d03 (patch) | |
tree | 1207e67b5b15f540963db05e7be89f3ca950e724 /lib/lsg_web/endpoint.ex | |
parent | Nola rename, the end. pt 6. Refs T77. (diff) |
Nola rename: The Big Move, Refs T77
Diffstat (limited to 'lib/lsg_web/endpoint.ex')
-rw-r--r-- | lib/lsg_web/endpoint.ex | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/lib/lsg_web/endpoint.ex b/lib/lsg_web/endpoint.ex deleted file mode 100644 index a401f54..0000000 --- a/lib/lsg_web/endpoint.ex +++ /dev/null @@ -1,62 +0,0 @@ -defmodule NolaWeb.Endpoint do - use Sentry.PlugCapture - use Phoenix.Endpoint, otp_app: :nola - - # Serve at "/" the static files from "priv/static" directory. - # - # You should set gzip to true if you are running phoenix.digest - # when deploying your static files in production. - plug Plug.Static, - at: "/", from: :nola, gzip: false, - only: ~w(assets css js fonts images favicon.ico robots.txt) - - # Code reloading can be explicitly enabled under the - # :code_reloader configuration of your endpoint. - if 42==43 && code_reloading? do - socket "/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket - plug Phoenix.LiveReloader - plug Phoenix.CodeReloader - end - - plug Plug.RequestId - plug Plug.Logger - - plug Plug.Parsers, - parsers: [:urlencoded, :multipart, :json], - pass: ["*/*"], - json_decoder: Jason - - plug Sentry.PlugContext - plug Plug.MethodOverride - plug Plug.Head - - @session_options [store: :cookie, - key: "_nola_key", - signing_salt: "+p7K3wrj"] - - - socket "/live", Phoenix.LiveView.Socket, - websocket: [connect_info: [session: @session_options]] - - # The session will be stored in the cookie and signed, - # this means its contents can be read but not tampered with. - # Set :encryption_salt if you would also like to encrypt it. - plug Plug.Session, @session_options - - plug NolaWeb.Router - - @doc """ - Callback invoked for dynamically configuring the endpoint. - - It receives the endpoint configuration and checks if - configuration should be loaded from the system environment. - """ - def init(_key, config) do - if config[:load_from_system_env] do - port = System.get_env("PORT") || raise "expected the PORT environment variable to be set" - {:ok, Keyword.put(config, :http, [:inet6, port: port])} - else - {:ok, config} - end - end -end |