| 1 | <?php | ||
| 7 | class Http | ||
| 8 | { | ||
| 9 | /** | ||
| 10 | * Application Object | ||
| 11 | * | ||
| 12 | * @var \System\Application | ||
| 13 | */ | ||
| 14 | private $app; | ||
| 15 | |||
| 16 | /** | ||
| 17 | * Constructor | ||
| 18 | * | ||
| 19 | * @param \System\Application $app | ||
| 20 | */ | ||
| 21 | public function __construct(Application $app) | ||
| 25 | |||
| 26 | /** | ||
| 27 | * Check if the website is secure | ||
| 28 | * | ||
| 29 | * @return bool | ||
| 30 | */ | ||
| 31 | public function isSecure() | ||
| 38 | |||
| 39 | /** | ||
| 40 | * Check if HTTPS is 'on' | ||
| 41 | * | ||
| 42 | * @return bool | ||
| 43 | */ | ||
| 44 | private function checkHttp() | ||
| 51 | |||
| 52 | /** | ||
| 53 | * Check if HTTP_X_FORWARDED_PROTO is not empty or 'https' | ||
| 54 | * | ||
| 55 | * @return bool | ||
| 56 | */ | ||
| 57 | private function checkHttpXforwardedProto() | ||
| 64 | |||
| 65 | /** | ||
| 66 | * Check if HTTP_X_FORWARDED_SSL is 'on' | ||
| 67 | * | ||
| 68 | * @return bool | ||
| 69 | */ | ||
| 70 | private function checkHttpXforwardedSsl() | ||
| 77 | } | ||
| 78 |