Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Referer header not set correctly for internal routing when JS is enabled #3510

Closed
kenneth-gray opened this issue Jun 19, 2022 · 4 comments
Closed

Comments

@kenneth-gray
Copy link

kenneth-gray commented Jun 19, 2022

What version of Remix are you using?

1.5.1

Steps to Reproduce

Create 2 routes:

  • page-1.tsx
  • page-2.tsx

Add a link from page-1 to page-2 and make sure that page-2 either logs or displays the referer header. Select the page-2 link from page-1 when JS is enabled.

Expected Behavior

The referer header should be set to the URL of page-1.

Actual Behavior

The referer header will be set to the URL of page-2.

When JS is disabled the behaviour is as expected.

@brian-dlee
Copy link

brian-dlee commented Jul 30, 2022

I can confirm we are seeing this happen in 1.6.5. I created this project to illustrate a pattern on how to implement this functionality despite the existing issue. I'm not sure if this package will be widely used or anything, but if anything it's a place for others to look at so we can avoid the whole wheel re-invention.

https://github.com/brian-dlee/remix-return-navigation

@brian-dlee
Copy link

Also, I came across a note where the remix folk described wanting to know use cases for useLocation as it implied custom routing. In my case, the solution relies on useLocation but I wouldn't say it does any kind of custom routing. Food for thought for anyone that comes across this.

@machour
Copy link
Collaborator

machour commented Jan 22, 2023

@kenneth-gray could you check if this still happens on Remix 1.11.1 ?
If it's the case, please provide a repository reproducing the problem 🙏🏼

@machour machour added the needs-response We need a response from the original author about this issue/PR label Jan 22, 2023
@kenneth-gray
Copy link
Author

Fixed in 1.11.1, thanks!

@machour machour removed the needs-response We need a response from the original author about this issue/PR label Jan 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants