Skip to content
Snippets Groups Projects
Verified Commit 1598a144 authored by Ophestra's avatar Ophestra
Browse files

fix(api): use default permissive CORS configuration when unset


Turns out CORS defaults to strict if no headers are sent at all, so this permissive default makes more sense.

Signed-off-by: default avatarOphestra Umiker <cat@ophivana.moe>
parent a604811f
No related branches found
Tags v0.0.5
1 merge request!12fix(api): use default permissive CORS configuration when unset
Pipeline #992 passed
......@@ -23,7 +23,8 @@ func serve(sig chan os.Signal, db *leveldb.DB) error {
AllowHeaders: []string{"Origin", "Content-Type", "Accept"},
}))
} else {
log.Println("CORS disabled")
log.Println("CORS unset")
app.Use(cors.New(cors.ConfigDefault))
}
var captcha fiber.Handler
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment