Redirect - providing the missing redirect macro in Phoenix.Router 🙃

Hello :wave:

In addition to forward/4, this library allows you to redirect a request from one path to another from your router.ex file:

redirect "/path", "/new-path", :permanent # 301 redirect
redirect "/path", "/new-path", :temporary # 302 redirect


Repository:

:v:

2 Likes