Added missing CORS headers and xhrFields

This commit is contained in:
2019-06-19 10:34:31 +00:00
parent 6081e42d14
commit 5a2d3313e7
2 changed files with 5 additions and 0 deletions

View File

@ -31,6 +31,8 @@
}))[0];
if (($cookieDomain && (is_null($httpOrigin) || $originDomain)) && setcookie('JWT', $queryString['token'], (time() + $settings->Session['Duration']), '/', '.' . $cookieDomain)) {
header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}");
header('Access-Control-Allow-Credentials: true');
header('Access-Control-Max-Age: 86400');
header("HTTP/1.1 202 Accepted");
exit;
}