cover/Elixir.WalletWeb.Router.html

1 3 defmodule WalletWeb.Router do
2 use WalletWeb, :router
3
4 1 pipeline :browser do
5 plug :accepts, ["html"]
6 plug :fetch_session
7 plug :fetch_live_flash
8 plug :put_root_layout, html: {WalletWeb.Layouts, :root}
9 plug :protect_from_forgery
10 plug :put_secure_browser_headers
11 end
12
13
:-(
pipeline :api do
14 plug :accepts, ["json"]
15 end
16
17 scope "/", WalletWeb do
18 pipe_through :browser
19
20 1 get "/", PageController, :home
21 end
22
23 # Other scopes may use custom stacks.
24 # scope "/api", WalletWeb do
25 # pipe_through :api
26 # end
27
28 # Enable LiveDashboard and Swoosh mailbox preview in development
29 if Application.compile_env(:wallet_web, :dev_routes) do
30 # If you want to use the LiveDashboard in production, you should put
31 # it behind authentication and allow only admins to access it.
32 # If your application does not have an admins-only section yet,
33 # you can use Plug.BasicAuth to set up some basic authentication
34 # as long as you are also using SSL (which you should anyway).
35 import Phoenix.LiveDashboard.Router
36
37 scope "/dev" do
38 pipe_through :browser
39
40 live_dashboard "/dashboard", metrics: WalletWeb.Telemetry
41 forward "/mailbox", Plug.Swoosh.MailboxPreview
42 end
43 end
44 end
Line Hits Source