Skip to content

Commit 15c2cc4

Browse files
committed
Add OPTIONS for preflight
1 parent ef03abd commit 15c2cc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/server/server.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func Serve(dbUrl string, natsUrl string) error {
8383
router.Use(middleware.AllowContentType("application/octet-stream", "application/json"))
8484
router.Use(cors.New(cors.Options{
8585
AllowedOrigins: []string{"*"},
86-
AllowedMethods: []string{"GET", "POST", "DELETE"},
86+
AllowedMethods: []string{"GET", "POST", "DELETE", "OPTIONS"},
8787
AllowedHeaders: []string{"*"},
8888
MaxAge: 50,
8989
}).Handler)

0 commit comments

Comments
 (0)