From 5b8a7f79f0939f925efd7b3f9472a38a9c5bc61e Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Mon, 18 Mar 2024 15:45:29 -0400 Subject: [PATCH] fix: use AllowOriginFunc in tus --- api/s5/s5.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/s5/s5.go b/api/s5/s5.go index f183641..14eeec8 100644 --- a/api/s5/s5.go +++ b/api/s5/s5.go @@ -386,7 +386,9 @@ func (w *s5TusJwtResponseWriter) WriteHeader(statusCode int) { func BuildTusCors() func(h http.Handler) http.Handler { mw := cors.New(cors.Options{ - AllowedOrigins: []string{"*"}, + AllowOriginFunc: func(origin string) bool { + return true + }, AllowedMethods: []string{"GET", "POST", "PATCH", "DELETE", "HEAD", "OPTIONS"}, AllowedHeaders: []string{ "Authorization",