Is there a way to insert a plug to start before the router selects the controller / action? I have an application that will be redirected to the root path for certain subdomains, regardless of the current path in these domains. So:
sub.myapp.com/foo/bar should redirect to sub.myapp.com/
But by default, the router says that there is no /foo/bar path, and it stops my traffic jams, that is, it never hits my redirect.
Is there a way to insert my plug in front of the router by selecting an action / controller?
(Note: I'm sure I can handle this case with the catch route for everyone , but I'm just wondering if there is a better way.)
elixir phoenix-framework
Micah
source share