Skip to content

Commit c5e6469

Browse files
committed
fix cors
1 parent c62fe6e commit c5e6469

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/main/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ func main() {
2222
router := gin.Default()
2323

2424
router.Use(cors.New(cors.Config{
25-
AllowOrigins: []string{"*"}, // Allows all origins
25+
AllowAllOrigins: true, // This properly allows all origins without credentials conflict
2626
AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
2727
AllowHeaders: []string{"Origin", "Content-Type", "Accept", "did-sign", "did-pk"},
2828
ExposeHeaders: []string{"Content-Length"},
29-
AllowCredentials: true,
29+
AllowCredentials: false, // Must be false when allowing all origins
3030
MaxAge: 12 * time.Hour,
3131
}))
3232

0 commit comments

Comments
 (0)