svenfuchs/routing-filter

Filter also on subdomains

Closed this issue · 2 comments

Hi there,

I'm currently using your plugin in order to filter the subdomain and add it as a param value, which is kind of important in my case. The thing is, since only the path is being passed to the around_recognize filter, along with the env from the request, i have to parse the env Host myself in order to get get the subdomain, which is something that the request object already does. It would be kind of good to either get the whole request on the filter, or, if heavy, get the domain, subdomain, scheme, port, all of that. Lets say, i wanted to filter the language as a subdomain.

Is it so, or am i missing something?

Regards,
Tiago

As you correctly noted RoutingFilter only works on the path part of the request. Since Rails makes the request object available in the router itself as well es in the controllers I am wondering what you are accomplishing/trying to accomplish with routing-filter that couldn't be done within the rails router or controllers.

Sorry, I've already worked the issue around, exactly by using the router properties, and forgot to close the issue. Thx for the answer though.