Compare commits
2 Commits
b8524880a5
...
180157ea91
Author | SHA1 | Date | |
---|---|---|---|
180157ea91 | |||
78b58d4900 |
@ -15,7 +15,7 @@ class Cors {
|
||||
|
||||
$response = $handler->handle($request);
|
||||
|
||||
$response = $response->withHeader('Access-Control-Allow-Origin', 'http://localhost:8080,http://localhost:8081');
|
||||
$response = $response->withHeader('Access-Control-Allow-Origin', '*');
|
||||
$response = $response->withHeader('Access-Control-Allow-Methods', implode(',', $methods));
|
||||
$response = $response->withHeader('Access-Control-Allow-Headers', $requestHeaders);
|
||||
//$response = $response->withHeader('Access-Control-Allow-Credentials', 'true');
|
||||
|
@ -10,7 +10,7 @@ server {
|
||||
try_files $uri /index.php$is_args$args;
|
||||
}
|
||||
|
||||
add_header 'Access-Control-Allow-Origin' 'http://localhost:8080';
|
||||
add_header 'Access-Control-Allow-Origin' "$http_origin";
|
||||
add_header 'Access-Control-Allow-Methods' 'GET,POST,PUT,DELETE,OPTIONS';
|
||||
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
|
||||
add_header 'Content-Type' 'application/json';
|
||||
|
Reference in New Issue
Block a user