Skip to content

Commit

Permalink
force https
Browse files Browse the repository at this point in the history
  • Loading branch information
Meezaan-ud-Din Abdu Dhil-Jalali Wal-Ikram committed Jul 15, 2019
1 parent a882061 commit 63278e6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Quran/Helper/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public static function editions($editions)

public static function isHttps()
{
return true; // Always force https - we can't really tell on a Swarm unless we get HA proxy to pass a parameter.
// But https is safe for this.

if ( isset($_SERVER) ) {
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {
return true;
Expand Down

0 comments on commit 63278e6

Please sign in to comment.