Catch-all/wildcard route in Elixir's Phoenix?

ElixirPhoenix Framework

Elixir Problem Overview


In the Phoenix router is there a route that could act as a wildcard?

Elixir Solutions


Solution 1 - Elixir

Ah, the famous pokemon route:

get "/*path"

You will find the paths inside conn.params["path"] or as conn.path_info.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJason GView Question on Stackoverflow
Solution 1 - ElixirJosé ValimView Answer on Stackoverflow