unauthorized response, with php 7.1
Closed this issue · 1 comments
jerfeson commented
Always getting an unauthorized response, with php 7.1.18, on the shared hostgator server, everything works perfectly locally (php7.2 OR 7.1.18). Can someone help me ?
$app->add(new Tuupola\Middleware\HttpBasicAuthentication([
"path" => "/v1",
"secure" => false,
"relaxed" => ["localhost"],
"users" => [
"teste" => 'teste',
]
]));
tuupola commented
Make sure the authentication header is passed to PHP. For example if the hosting company uses FastCGI some extra steps are required. You can do for example print_r($_SERVER)
somewhere in your code and look for the headers there.