Skip to content

Commit 6fcfb71

Browse files
committed
fix: update CORS configuration to allow additional frontend origins
Added 'http://localhost:5174' and 'http://localhost:5175' to the allowed origins in the CORS configuration, enabling support for multiple frontend development ports.
1 parent 4ebaf39 commit 6fcfb71

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

backend/config/cors.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
return [
44
'paths' => ['api/*'],
55
'allowed_methods' => ['*'],
6-
'allowed_origins' => ['http://localhost:5173'], // フロントエンドのURL
6+
'allowed_origins' => ['http://localhost:5173', 'http://localhost:5174', 'http://localhost:5175'], // フロントエンドのURL(Viteは利用可能なポートを自動選択)
77
'allowed_origins_patterns' => [],
88
'allowed_headers' => ['*'],
99
'exposed_headers' => [],

0 commit comments

Comments
 (0)