增加跨域头

This commit is contained in:
huangguancheng 2025-01-10 15:07:12 +08:00
parent 114b577c39
commit 8edae516dd

View File

@ -148,7 +148,7 @@ Route::group('/googleads', function () {
Route::post('/refresh_token_test', [OAuthController::class, 'testRefreshToken']); Route::post('/refresh_token_test', [OAuthController::class, 'testRefreshToken']);
Route::post('/refresh_token_revoke', [OAuthController::class, 'revokeRefreshToken']); Route::post('/refresh_token_revoke', [OAuthController::class, 'revokeRefreshToken']);
})->middleware([ })->middleware([
// app\middleware\JwtLocal::class, app\middleware\JwtLocal::class,
]); ]);
}); });
@ -211,7 +211,7 @@ Route::fallback(function (Request $request) {
'Access-Control-Allow-Credentials' => 'true', 'Access-Control-Allow-Credentials' => 'true',
'Access-Control-Allow-Origin' => "*", 'Access-Control-Allow-Origin' => "*",
'Access-Control-Allow-Methods' => '*', 'Access-Control-Allow-Methods' => '*',
'Access-Control-Allow-Headers' => 'Authorization, Content-Length, X-CSRF-Token, Accept, Origin, Host, Connection, Accept-Encoding, Accept-Language, Keep-Alive, User-Agent, Content-Type', 'Access-Control-Allow-Headers' => 'Authorization, Content-Length, X-CSRF-Token,X-Request-Id, Accept, Origin, Host, Connection, Accept-Encoding, Accept-Language, Keep-Alive, User-Agent, Content-Type',
]); ]);
return $response; return $response;
}); });