Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func setupAPIServer(client *firestore.Client) *gin.Engine {
h := handler.NewHandler(client)
router := gin.Default()
router.Use(func(c *gin.Context) {
c.Header("Access-Control-Allow-Origin", "http://localhost:3000")
c.Header("Access-Control-Allow-Origin", "*")
c.Header("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS")
c.Header("Access-Control-Allow-Headers", "Content-Type")
Comment on lines 70 to 73
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CORS の Access-Control-Allow-Origin* に広げると、想定外のオリジンからも API レスポンスを読み取れる状態になり得ます(将来 Cookie/認証を入れた場合は withCredentials とも両立できません)。少なくとも本番は許可オリジンを設定値(環境変数/設定ファイル)で限定し、必要なら Access-Control-Allow-Credentials: true と組み合わせてください。

Copilot uses AI. Check for mistakes.
})
Expand Down
1 change: 1 addition & 0 deletions frontend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ GENERATOR_OPTS := \

all: generate-client

# openapi.yamlから生成されたソースコードが格納される場所
generate-client:
$(GENERATOR) generate $(GENERATOR_OPTS)

Expand Down
Loading