luckyframework / lucky

A full-featured Crystal web framework that catches bugs for you, runs incredibly fast, and helps you write code that lasts.
https://luckyframework.org
MIT License
2.59k stars 156 forks source link

`#previous_url` stuck in a loop #1742

Closed jcads closed 1 year ago

jcads commented 2 years ago

Describe the bug previous_url does not do the expected behavior when referrer is the current page itself.

Scenario Let's say you're in /users and you clicked a button that sends a POST request to /users/create which redirects back to /users. The Referrer header would be set as "/users" causing the previous_url to not work as expected.