Page MenuHomePhabricator

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

Details

Reference
bz68554

Event Timeline

bzimport raised the priority of this task from to Normal.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

scfc added subscribers: JohnLewis, Dzahn.EditedMar 25 2015, 4:58 PM

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

JohnLewis closed this task as Resolved.Mar 25 2015, 5:28 PM

@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).

Dzahn added a comment.EditedMar 25 2015, 5:35 PM

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
Dzahn added a comment.Mar 25 2015, 5:37 PM

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

Dzahn set Security to None.
Restricted Application added a project: Traffic. · View Herald TranscriptMar 5 2019, 10:52 AM