mirror of
https://github.com/1f349/violet.git
synced 2024-11-21 10:51:40 +00:00
Patch to not use * for CORS auth header
This commit is contained in:
parent
f8dde8eebe
commit
333394cf89
@ -20,7 +20,8 @@ import (
|
||||
|
||||
// serveApiCors outputs the cors headers to make APIs work.
|
||||
var serveApiCors = cors.New(cors.Options{
|
||||
AllowedOrigins: []string{"*"}, // allow all origins for api requests
|
||||
// allow all origins for api requests
|
||||
AllowOriginFunc: func(origin string) bool { return true },
|
||||
AllowedHeaders: []string{"Content-Type", "Authorization"},
|
||||
AllowedMethods: []string{
|
||||
http.MethodGet,
|
||||
|
Loading…
Reference in New Issue
Block a user