You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is most visible with dirhtml builds where a trailing slash is often omitted and curling https://flask.palletsprojects.com/en/1.1.x/api/ directly is fine. This affects subdomain docs too (*.readthedocs.io) but in a different manner (HTTPS -> HTTP -> HTTPS again):
$ curl -IL https://flask.readthedocs.io/en/1.1.x/api
HTTP/1.1 301 Moved Permanently
...
Location: http://flask.readthedocs.io/en/1.1.x/api/
...
HTTP/1.1 301 Moved Permanently
...
Location: https://flask.readthedocs.io/en/1.1.x/api/
...
It affects non-dirhtml docs as well although it isn't as visible because the issue is hit pretty infrequently because most requests end with .html:
My current best guess is that this is due to the nginx try_files directive using the first listener which is port 80. For subdomain docs, we have a blanket HTTP -> HTTPS redirect so this problem is masked although not really resolved. We can't do a blanket redirect for all custom domains because many people have not correctly setup their custom domain such that RTD can issue a certificate. (see #4641)
This also affects the redirects in place for $lang/$version:
The text was updated successfully, but these errors were encountered:
davidfischer
changed the title
Fix HTTPS -> HTTP redirect in URLs missing a trailing slash
HTTPS -> HTTP redirect in URLs missing a trailing slash
Oct 1, 2019
Based on my reading, I think the fix may be to turn absolute_redirect off; in nginx. It looks like nginx issues redirects under some circumstances and it uses the same $scheme as the request. Since SSL is terminated at the load balancer, the $scheme is http rather than https.
Under some circumstances, we are redirecting docs from HTTPS -> HTTP. We basically never want to do this.
This is most visible with dirhtml builds where a trailing slash is often omitted and curling
https://flask.palletsprojects.com/en/1.1.x/api/
directly is fine. This affects subdomain docs too (*.readthedocs.io
) but in a different manner (HTTPS -> HTTP -> HTTPS again):It affects non-dirhtml docs as well although it isn't as visible because the issue is hit pretty infrequently because most requests end with
.html
:My current best guess is that this is due to the nginxFor subdomain docs, we have a blanket HTTP -> HTTPS redirect so this problem is masked although not really resolved. We can't do a blanket redirect for all custom domains because many people have not correctly setup their custom domain such that RTD can issue a certificate. (see #4641)try_files
directive using the first listener which is port 80.This also affects the redirects in place for
$lang/$version
:The text was updated successfully, but these errors were encountered: