mirror of
https://gitee.com/technical-laohu/mpay_v2_webman.git
synced 2026-04-22 10:04:27 +08:00
更新后端基础
This commit is contained in:
@@ -22,13 +22,11 @@ class Cors implements MiddlewareInterface
|
||||
{
|
||||
$response = strtoupper($request->method()) === 'OPTIONS' ? response('', 204) : $handler($request);
|
||||
|
||||
$response->withHeaders([
|
||||
return $response->withHeaders([
|
||||
'Access-Control-Allow-Credentials' => 'true',
|
||||
'Access-Control-Allow-Origin' => $request->header('origin', '*'),
|
||||
'Access-Control-Allow-Methods' => $request->header('access-control-request-method', '*'),
|
||||
'Access-Control-Allow-Headers' => $request->header('access-control-request-headers', '*'),
|
||||
]);
|
||||
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user