An event management platform. https://upshot.events/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

endpoint.ex 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. defmodule Upshot.Web.Endpoint do
  2. use Phoenix.Endpoint, otp_app: :upshot
  3. socket "/socket", Upshot.Web.UserSocket,
  4. websocket: true,
  5. longpoll: false
  6. # Serve at "/" the static files from "priv/static" directory.
  7. #
  8. # You should set gzip to true if you are running phx.digest
  9. # when deploying your static files in production.
  10. plug Plug.Static,
  11. at: "/",
  12. from: :upshot,
  13. gzip: false,
  14. only: ~w(css fonts images js favicon.ico robots.txt)
  15. # Code reloading can be explicitly enabled under the
  16. # :code_reloader configuration of your endpoint.
  17. if code_reloading? do
  18. socket "/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket
  19. plug Phoenix.LiveReloader
  20. plug Phoenix.CodeReloader
  21. end
  22. plug Plug.RequestId
  23. plug Plug.Logger
  24. plug Plug.Parsers,
  25. parsers: [:urlencoded, :multipart, :json],
  26. pass: ["*/*"],
  27. json_decoder: Phoenix.json_library()
  28. plug Plug.MethodOverride
  29. plug Plug.Head
  30. # The session will be stored in the cookie and signed,
  31. # this means its contents can be read but not tampered with.
  32. # Set :encryption_salt if you would also like to encrypt it.
  33. plug Plug.Session,
  34. store: :cookie,
  35. key: "_upshot_key",
  36. signing_salt: "HvbaWUTn"
  37. plug Upshot.Web.Router
  38. end