I have in my router the following generic scope:
scope "/", MyModule do pipe_through(:browser) ...
In the pipeline browser, I call a function that sets a locale using
conn |> put_session(:locale, "fr")
It is working fine.
But, when I try a call a route that doesn’t match anything defined in that scope, for example
mywebsite.com/xxxx, it looks like the request does not go through the browser pipeline.
It is coherent with what I read in the doc : “Note that router pipelines are only invoked after a route is found. No plug is invoked in case no matches were found.”
But I would like to have my locale set to render my 404 page, so I need the request to go through the browser pipeline. How can I do that ? I cannot have a more generic scope that “/”.