|
|
|
|
7399
|
$response = $this->responder->error(ErrorCode::ORIGIN_FORBIDDEN, $origin);
|
7399
|
$response = $this->responder->error(ErrorCode::ORIGIN_FORBIDDEN, $origin);
|
7400
|
} elseif ($method == 'OPTIONS') {
|
7400
|
} elseif ($method == 'OPTIONS') {
|
7401
|
$response = ResponseFactory::fromStatus(ResponseFactory::OK);
|
7401
|
$response = ResponseFactory::fromStatus(ResponseFactory::OK);
|
7402
|
- $allowHeaders = $this->getProperty('allowHeaders', 'Content-Type, X-XSRF-TOKEN, X-Authorization');
|
|
|
|
|
7402
|
+ $allowHeaders = $this->getProperty('allowHeaders', 'Content-Type, X-XSRF-TOKEN, X-Authorization, X-Debug-Info, X-Exception-Name, X-Exception-Message, X-Exception-File');
|
7403
|
if ($allowHeaders) {
|
7403
|
if ($allowHeaders) {
|
7404
|
$response = $response->withHeader('Access-Control-Allow-Headers', $allowHeaders);
|
7404
|
$response = $response->withHeader('Access-Control-Allow-Headers', $allowHeaders);
|
7405
|
}
|
7405
|
}
|
|
|
|
|
7415
|
if ($maxAge) {
|
7415
|
if ($maxAge) {
|
7416
|
$response = $response->withHeader('Access-Control-Max-Age', $maxAge);
|
7416
|
$response = $response->withHeader('Access-Control-Max-Age', $maxAge);
|
7417
|
}
|
7417
|
}
|
7418
|
- $exposeHeaders = $this->getProperty('exposeHeaders', '');
|
|
|
|
|
7418
|
+ $exposeHeaders = $this->getProperty('exposeHeaders', 'X-Debug-Info, X-Exception-Name, X-Exception-Message, X-Exception-File');
|
7419
|
if ($exposeHeaders) {
|
7419
|
if ($exposeHeaders) {
|
7420
|
$response = $response->withHeader('Access-Control-Expose-Headers', $exposeHeaders);
|
7420
|
$response = $response->withHeader('Access-Control-Expose-Headers', $exposeHeaders);
|
7421
|
}
|
7421
|
}
|