Page MenuHomePhabricator

https://planet.wikimedia.org redirects to http://meta.wikimedia.org/wiki/Planet_Wikimedia
Closed, ResolvedPublic

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:32 AM
bzimport added a project: HTTPS.
bzimport set Reference to bz68554.

Change 149311 had a related patch set uploaded by Chmarkine:
planet.wikimedia.org -- fix https redirects to http

https://gerrit.wikimedia.org/r/149311

(For the records, this was already mentioned in bug 39678 comment 4)

Change 149311 merged by Dzahn:
planet.wikimedia.org -- fix https redirects to http

https://gerrit.wikimedia.org/r/149311

This was apparently a result of https://gerrit.wikimedia.org/r/#/c/181984/ which indicates (CMIIW) that all SSL stuff is now handled at a proxy and the Apaches only ever get accessed by http now? (Cf. T60048 and T85789.) I think the proxy sets an HTTP header and that is available in Apache as an environment variable which can be used to route the redirect appropriately? @JohnLewis, @Dzahn, is that correct? Does %{ENV:RW_PROTO} work for planet as well?

Change 199638 had a related patch set uploaded (by John F. Lewis):
planet: use https instead of http

https://gerrit.wikimedia.org/r/199638

Change 199638 merged by Gage:
planet: use https instead of http

https://gerrit.wikimedia.org/r/199638

@scfc thanks for adding me to this.

I made a patch which fixes the redirect to use https instead of http and asked Gage to deploy this (which he has).

I think the proxy sets an HTTP header and that is available in Apache as an environment variable which can be used to route the redirect appropriately? @JohnLewis, @Dzahn, is that correct? Does %{ENV:RW_PROTO} work for planet as well?

@scfc Here's the kind of standard snippet we use for http->https redirects when an Apache service is behind the misc-web cluster that terminates SSL:

RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{REQUEST_URI} !^/status$
RewriteRule ^/(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,E=ProtoRedirect]
Header always merge Vary X-Forwarded-Proto env=ProtoRedirect

would have seen this earlier if it was in the Operations project, btw. thanks for reporting, and thanks John for fixing