11 use Psr\Http\Message\ResponseInterface;
21 public static function addCorsHeaders(ResponseInterface $response): ResponseInterface
25 ->withHeader(
'Access-Control-Allow-Origin', $SysConf[
'SYSCONFIG'][
'CorsOrigins'])
26 ->withHeader(
'Access-Control-Expose-Headers',
'Look-at, X-Total-Pages, Retry-After')
27 ->withHeader(
'Access-Control-Allow-Headers',
'X-Requested-With, Content-Type, Accept, Origin, Authorization, action, accesslevel, active, copyright, Content-Type, description, filename, filesizemax, filesizemin, folderDescription, folderId, folderName, groupName, ignoreScm, applyGlobal, license, limit, name, page, parent, parentFolder, public, reportFormat, searchType, tag, upload, uploadDescription, uploadId, uploadType, excludefolder')
28 ->withHeader(
'Access-Control-Allow-Methods',
'GET, POST, PUT, DELETE, PATCH, OPTIONS')
29 ->withHeader(
'Access-Control-Allow-Credentials',
'true');
static addCorsHeaders(ResponseInterface $response)