Created
August 10, 2016 13:29
-
-
Save Fadhil/b01481dc816639ba088ecdb2cde7a152 to your computer and use it in GitHub Desktop.
This file contains 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 Flexphoenix.Endpoint do | |
use Phoenix.Endpoint, otp_app: :flexphoenix | |
socket "/socket", Flexphoenix.UserSocket | |
# 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: :flexphoenix, gzip: false, | |
only: ~w(uploads css fonts images img js favicon.ico robots.txt) | |
# Code reloading can be explicitly enabled under the | |
# :code_reloader configuration of your endpoint. | |
if 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: Poison | |
plug Plug.MethodOverride | |
plug Plug.Head | |
plug Plug.Session, | |
store: :cookie, | |
key: "_flexphoenix_key", | |
signing_salt: "ZjRCjSN5" | |
plug Flexphoenix.Router | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment