Skip to content

Instantly share code, notes, and snippets.

@aep
Created March 29, 2016 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aep/8d21b744ab8051ff259f to your computer and use it in GitHub Desktop.
Save aep/8d21b744ab8051ff259f to your computer and use it in GitHub Desktop.
defmodule Fleet.Endpoint do
use Phoenix.Endpoint, otp_app: :fleet
# 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: :fleet, gzip: false,
only: ~w(css images js favicon.ico robots.txt)
# Code reloading can be explicitly enabled under the
# :code_reloader configuration of your endpoint.
if code_reloading? do
plug Phoenix.LiveReloader
plug Phoenix.CodeReloader
end
plug Plug.Logger
plug Plug.Parsers,
parsers: [:urlencoded, :multipart, :json],
pass: ["*/*"],
json_decoder: Poison
plug Plug.MethodOverride
plug Plug.Head
plug Plug.Session,
store: :cookie,
key: "_fleet_key",
signing_salt: "klY1ojmx"
plug :router, Fleet.Router
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment