Created
March 29, 2016 15:16
-
-
Save aep/8d21b744ab8051ff259f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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