1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 09:18:48 +02: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() {
// TODO: We should probably provide options here eventually, but for now
// just never require HTTPS for external-domain blogs.
return false;
$full_uri = $this->getBlog()->getDomainFullURI();
$full_uri = new PhutilURI($full_uri);
return ($full_uri->getProtocol() == 'https');
}
public function getPriority() {