about summary refs log tree commit diff
path: root/lib/rook_web/router.ex
blob: 827881ab2fd79ee2e5a4242feb2dcd8b93513b89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
defmodule RookWeb.Router do
  use RookWeb, :router

  pipeline :browser do
    plug :accepts, ["html"]
    plug :fetch_session
    plug :fetch_flash
    plug :protect_from_forgery
    plug :put_secure_browser_headers
  end

  pipeline :api do
    plug :accepts, ["json"]
  end

  scope "/", RookWeb do
    pipe_through :browser

    get "/", AppController, :share
    get "/:token", AppController, :request
  end

  # Other scopes may use custom stacks.
  # scope "/api", RookWeb do
  #   pipe_through :api
  # end
end