Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit ae3aec8

Browse files
committed
Modify detection of HTTPS
This modifies the detection of HTTPS by checking whether the lower-case value of the HTTPS-key of the server variable equals 'on'. Before that checked whether the value did *not* match 'off' which meant that the nginx-default for non-HTTPS connections (which, according to the [documentation](http://nginx.org/en/docs/http/ngx_http_core_module.html#var_https) is an empty string) did in fact match and returned that the connection *is* encrypted. This fixes #362 # Conflicts: # src/functions/marshal_uri_from_sapi.php
1 parent 1dc4959 commit ae3aec8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/functions/marshal_uri_from_sapi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ function marshalUriFromSapi(array $server, array $headers)
171171
} else {
172172
$https = false;
173173
}
174-
if (($https && 'off' !== strtolower($https))
174+
if (($https && 'on' === strtolower($https))
175175
|| strtolower($getHeaderFromArray('x-forwarded-proto', $headers, false)) === 'https'
176176
) {
177177
$scheme = 'https';

0 commit comments

Comments
 (0)