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