Skip to content
This repository was archived by the owner on Nov 23, 2025. It is now read-only.

Commit cd35a75

Browse files
committed
fix: Update CORS configuration to allow requests from 127.0.0.1
1 parent a6fa1e2 commit cd35a75

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

cmd/gateway/main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,13 @@ func main() {
203203
router.Use(middleware.Logger)
204204
router.Use(middleware.Recoverer)
205205

206+
// CORS Configuration - Allow frontend origins
207+
// In production, replace with actual frontend domain(s) via environment variable
206208
router.Use(cors.New(cors.Options{
207-
AllowedOrigins: []string{"http://localhost:3000"},
209+
AllowedOrigins: []string{
210+
"http://localhost:3000",
211+
"http://127.0.0.1:3000",
212+
},
208213
AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"},
209214
AllowedHeaders: []string{"Accept", "Authorization", "Content-Type", "X-CSRF-Token"},
210215
ExposedHeaders: []string{"Link"},

0 commit comments

Comments
 (0)