2019-09-28 22:30:55 +00:00
|
|
|
defmodule ClacksWeb.Router do
|
|
|
|
use ClacksWeb, :router
|
|
|
|
|
|
|
|
pipeline :browser do
|
|
|
|
plug :accepts, ["html"]
|
|
|
|
plug :fetch_session
|
|
|
|
plug :fetch_flash
|
|
|
|
plug :protect_from_forgery
|
|
|
|
plug :put_secure_browser_headers
|
|
|
|
end
|
|
|
|
|
2019-09-29 01:57:11 +00:00
|
|
|
pipeline :activitypub do
|
|
|
|
plug :accepts, ["activity+json", "html"]
|
2019-09-28 22:30:55 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
scope "/", ClacksWeb do
|
|
|
|
pipe_through :browser
|
|
|
|
|
|
|
|
get "/", PageController, :index
|
|
|
|
end
|
|
|
|
|
2019-09-29 01:57:11 +00:00
|
|
|
scope "/", ClacksWeb do
|
|
|
|
pipe_through :activitypub
|
|
|
|
|
|
|
|
get "/objects/:id", ObjectsController, :get
|
|
|
|
end
|
|
|
|
|
2019-09-28 22:30:55 +00:00
|
|
|
# Other scopes may use custom stacks.
|
|
|
|
# scope "/api", ClacksWeb do
|
|
|
|
# pipe_through :api
|
|
|
|
# end
|
|
|
|
end
|