server: reformat/refactor around redirects (again)#1009
Conversation
|
Weird. This works for me locally ( |
|
@iAdramelk @shcheklein related: do you guys know why when you |
|
Anyway, looking at https://dashboard.heroku.com/apps/dvc-landing-server-redi-btalyj/logs I see the review app error log is showing this a lot: which unfortunately is not a very informative stack trace... But per vercel/next.js#7303 (comment) this probably has to do with my changes around |
You can temporarily disable this redirect by commenting these lines: https://github.com/iterative/dvc.org/blob/master/src/utils/redirects.js#L37-L39 |
|
@iAdramelk @fabiosantoscode @jorgeorpinel this is a bug . It should not be redirecting to https locally. |
|
@jorgeorpinel NODE_ENV is set to production, making UPDATE: See #1010 |
|
@fabiosantoscode I would check if the redirects engine itself also matches on https only (thus preventing us from testing at least some redirects on localhost) |
|
@shcheklein path redirects are relative, so they go to localhost. Hostname redirects (man.dvc.org, error.dvc.org) take you to the real site, where HTTPS works. |
fabiosantoscode
left a comment
There was a problem hiding this comment.
I think I found the reason for the crash you mentioned earlier.
|
Thanks Fabio, that was part of it. Fixed this now in e51bc64 ! It's actually a kinda bug from Next... It expects that you always call |
|
In any case... This review app works well now. https://dvc-landing-server-redi-btalyj.herokuapp.com/ Thanks everyone for all the feedback. |
and update scripts/exclude-links.txt accordingly
|
👍 LGTM |
|
Deployed and double sanity checked on prod. All good! 🎉 |
|
@jorgeorpinel let me know if you had issues testing redirects locally. I tested them with:
And checked the status code and location header for each redirect. This is also possible with HTTP GUIs like postman. |
|
Seems to work properly after #1010. Thanks! |
Second attempt at #973.