mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10:55 +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:
parent
3bed16e750
commit
ee460b4f1b
1 changed files with 4 additions and 3 deletions
|
@ -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() {
|
||||||
|
|
Loading…
Reference in a new issue