WriteOn / WriteOnApp

On a mission to create the world's finest writing experience.
https://writeon.io
Apache License 2.0
1 stars 0 forks source link

Visiting sub-page with 'http' redirects to 'https' root #46

Closed yaboi closed 9 years ago

yaboi commented 9 years ago

If I try to go to www.writeon.io/for/travel-writers I'm redirected to https://www.writeon.io/

It's fine if it's redirected to https, but should retain the trailing url so that it redirects to the right page.

thinq4yourself commented 9 years ago

In server/index.js, line 23 changed:

return res.redirect('https://' + req.headers.host + req.path);

to

return res.redirect('https://' + req.headers.host + req.url);

yaboi commented 9 years ago

I tested this in Chrome's incognito mode and in Firefox (shouldn't have any cache or cookies) by manually typing in http://www.writeon.io/for/travel-writers and I was still redirected to https://www.writeon.io

@thinq4yourself - This doesn't seem to be fixed in prod...

thinq4yourself commented 9 years ago

Fixed in commit 4d70370 v1.10.4