router.ex 505 B

123456789101112131415161718192021222324252627
  1. defmodule WebWeb.Router do
  2. use WebWeb, :router
  3. pipeline :browser do
  4. plug :accepts, ["html"]
  5. plug :fetch_session
  6. plug :fetch_flash
  7. plug :protect_from_forgery
  8. plug :put_secure_browser_headers
  9. end
  10. pipeline :api do
  11. plug :accepts, ["json"]
  12. end
  13. scope "/", WebWeb do
  14. pipe_through :browser # Use the default browser stack
  15. get "/", PageController, :index
  16. end
  17. # Other scopes may use custom stacks.
  18. # scope "/api", WebWeb do
  19. # pipe_through :api
  20. # end
  21. end