mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Return 401 headers when authentication is required for the api call
This commit is contained in:
parent
3d23e98390
commit
098c84a29c
1 changed files with 2 additions and 0 deletions
|
|
@ -94,6 +94,8 @@ class OC_API {
|
|||
$response = new OC_OCS_Result(null, 998, 'Api method not found');
|
||||
}
|
||||
} else {
|
||||
header('WWW-Authenticate: Basic realm="Authorisation Required"');
|
||||
header('HTTP/1.0 401 Unauthorized');
|
||||
$response = new OC_OCS_Result(null, 997, 'Unauthorised');
|
||||
}
|
||||
// Send the response
|
||||
|
|
|
|||
Loading…
Reference in a new issue