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

Commit 0c4e083

Browse files
authored
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
1 parent 9a4b4a3 commit 0c4e083

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
@@ -168,7 +168,7 @@ function marshalUriFromSapi(array $server, array $headers) : Uri
168168
));
169169
}
170170

171-
return 'off' !== strtolower($https);
171+
return 'on' === strtolower($https);
172172
};
173173
if (array_key_exists('HTTPS', $server)) {
174174
$https = $marshalHttpsValue($server['HTTPS']);

0 commit comments

Comments
 (0)