fix: use AllowOriginFunc in tus
This commit is contained in:
parent
228cabd83b
commit
5b8a7f79f0
|
@ -386,7 +386,9 @@ func (w *s5TusJwtResponseWriter) WriteHeader(statusCode int) {
|
||||||
func BuildTusCors() func(h http.Handler) http.Handler {
|
func BuildTusCors() func(h http.Handler) http.Handler {
|
||||||
mw :=
|
mw :=
|
||||||
cors.New(cors.Options{
|
cors.New(cors.Options{
|
||||||
AllowedOrigins: []string{"*"},
|
AllowOriginFunc: func(origin string) bool {
|
||||||
|
return true
|
||||||
|
},
|
||||||
AllowedMethods: []string{"GET", "POST", "PATCH", "DELETE", "HEAD", "OPTIONS"},
|
AllowedMethods: []string{"GET", "POST", "PATCH", "DELETE", "HEAD", "OPTIONS"},
|
||||||
AllowedHeaders: []string{
|
AllowedHeaders: []string{
|
||||||
"Authorization",
|
"Authorization",
|
||||||
|
|
Loading…
Reference in New Issue