volto
volto copied to clipboard
return a 302 Redirect when visiting the link view
Fixes #3302
This way search engines get proper HTTP 302 Redirects.
Deploy Preview for volto canceled.
Name | Link |
---|---|
Latest commit | ce339b879a36864199dc9a7f4dbabeacbfcd882b |
Latest deploy log | https://app.netlify.com/sites/volto/deploys/64a3f6847c826b0008e88c19 |
Test summary
Run details
Project | Volto |
Status | Passed |
Commit | fe0b004f92 |
Started | Oct 15, 2022 4:19 PM |
Ended | Oct 15, 2022 4:31 PM |
Duration | 12:02 💡 |
OS | Linux Ubuntu - 20.04 |
Browser | Multiple |
View run in Cypress Dashboard ➡️
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard
@erral we are removing code that I think fixed some similar issues with the redirects in SSR. Do the <Redirect>
component works in SSR?
I have tested it both in browser and calling it with wget
and curl
and we get the HTTP redirect, that's what you mean?
Anyway I tried to add a test to this and I got an InvariantError saying that I should not be using the <Redirect>
component out of a <Router>
component, so I don't know whether this is a correct approach to return a proper HTTP Redirect :confused:
@erral try wrap it in a <MemoryRouter>
, there are some examples in the current tests.
Yes I tried that in the other PR, the RedirectBlock one, and it was OK, so now I have to take the time to bring that test here