1234567891011121314151617181920212223242526272829303132 |
- defmodule Hello.Endpoint do
- use Phoenix.Endpoint, otp_app: :hello
- # Serve at "/" the given assets from "priv/static" directory
- plug Plug.Static,
- at: "/", from: :hello, gzip: false,
- only: ~w(css images js favicon.ico robots.txt)
- # Code reloading will only work if the :code_reloader key of
- # the :phoenix application is set to true in your config file.
- 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: "_hello_key",
- signing_salt: "DNlAnJ2o"
- plug :router, Hello.Router
- end
|