-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Description
We use host constraints in router.ex, e. g.
scope "/", MyAppWeb, host: "api.example.com" do
pipe_through [:api]
get "/users", UserController, :index
end
scope "/", MyAppWeb, host: "admin.example.com" do
pipe_through [:browser]
get "/users", AdminUserController, :index
end
When running mix phx.routes we get:
GET /users MyAppWeb.UserController :index
GET /users MyAppWeb.AdminUserController :index
It would be better to get something like that:
[api.example.com] GET /users MyAppWeb.UserController :index
[admin.example.com] GET /users MyAppWeb.AdminUserController :index
If this is interesting for Phoenix framework, I would like to create a pull request for that.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels