Skip to content

Commit eb624a8

Browse files
committed
CORS error fix
1 parent c298104 commit eb624a8

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

cmd/main.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,14 @@ func main() {
149149
loggedMux := middleware.RequestLogger(mux)
150150

151151
corsHandler := cors.New(cors.Options{
152-
AllowedOrigins: []string{"http://localhost:3000", "http://localhost:5173"},
152+
AllowedOrigins: []string{
153+
"http://localhost:3000",
154+
"http://localhost:5173",
155+
"http://172.17.9.12:3001",
156+
"https://172.17.9.12:3001",
157+
"http://172.17.9.12:3000",
158+
"https://172.17.9.12:3000",
159+
},
153160
AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH"},
154161
AllowedHeaders: []string{"*"},
155162
AllowCredentials: true,

0 commit comments

Comments
 (0)