1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Redirect https blogs

Summary: Ref T9360, forces https if we say the blog is https.

Test Plan: Fake an https, get redirected.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9360

Differential Revision: https://secure.phabricator.com/D16241
This commit is contained in:
Chad Little 2016-07-06 17:17:02 -07:00
parent 3bed16e750
commit ee460b4f1b

View file

@ -18,9 +18,10 @@ final class PhameBlogSite extends PhameSite {
} }
public function shouldRequireHTTPS() { public function shouldRequireHTTPS() {
// TODO: We should probably provide options here eventually, but for now $full_uri = $this->getBlog()->getDomainFullURI();
// just never require HTTPS for external-domain blogs. $full_uri = new PhutilURI($full_uri);
return false;
return ($full_uri->getProtocol() == 'https');
} }
public function getPriority() { public function getPriority() {