Maurits van der Schee 4 years ago
parent
commit
18d8ba838f
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      api.php

+ 2
- 2
api.php View File

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
                 }

Loading…
Cancel
Save