Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

SERVER_PROTOCOL #14

Open
Adrianotiger opened this issue Jun 12, 2018 · 0 comments
Open

SERVER_PROTOCOL #14

Adrianotiger opened this issue Jun 12, 2018 · 0 comments

Comments

@Adrianotiger
Copy link

Adrianotiger commented Jun 12, 2018

To check if it is https, $_SERVER['SERVER_PROTOCOL'] is used.
On my server (Apache, PHP7.2) this will return HTTP/2.0 even if I am using https.

Config.php Line 35.

I think, this should be:

$protocol = stripos($_SERVER['REQUEST_SCHEME'], 'https') !== false ? 'https' : 'http';

or

$protocol = $_SERVER['HTTPS'] === 'on' ? 'https' : 'http';

But will definitively not work with $_SERVER['SERVER_PROTOCOL']

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant