|
@@ -20,7 +20,7 @@ class EnableCrossRequestMiddleware |
|
@@ -20,7 +20,7 @@ class EnableCrossRequestMiddleware |
|
20
|
if(isset($_SERVER['HTTP_ORIGIN'])){
|
20
|
if(isset($_SERVER['HTTP_ORIGIN'])){
|
|
21
|
$http_origin = $_SERVER['HTTP_ORIGIN'];
|
21
|
$http_origin = $_SERVER['HTTP_ORIGIN'];
|
|
22
|
}
|
22
|
}
|
|
23
|
- $response->header('Access-Control-Allow-Origin', $http_origin ?? '*');
|
23
|
+ $response->header('Access-Control-Allow-Origin', $http_origin);
|
|
24
|
$response->header('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS');
|
24
|
$response->header('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS');
|
|
25
|
$response->header('Access-Control-Allow-Headers', 'Origin, Content-Type, Authorization');
|
25
|
$response->header('Access-Control-Allow-Headers', 'Origin, Content-Type, Authorization');
|
|
26
|
if (strtolower($_SERVER['REQUEST_METHOD']) == 'options') {
|
26
|
if (strtolower($_SERVER['REQUEST_METHOD']) == 'options') {
|