mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
added CORS skip if session was created by AppAPI
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
This commit is contained in:
parent
e6832ed932
commit
2fb703dfda
1 changed files with 4 additions and 0 deletions
|
|
@ -97,6 +97,10 @@ class CORSMiddleware extends Middleware {
|
|||
if ($this->request->passesCSRFCheck()) {
|
||||
return;
|
||||
}
|
||||
// Skip CORS check for requests with AppAPI auth.
|
||||
if ($this->session->getSession()->get('app_api') === true) {
|
||||
return;
|
||||
}
|
||||
$this->session->logout();
|
||||
try {
|
||||
if ($user === null || $pass === null || !$this->session->logClientIn($user, $pass, $this->request, $this->throttler)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue