mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 12:00: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() {
|
||||
// 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() {
|
||||
|
|
Loading…
Reference in a new issue