Also allow headers with CORS (#339)

This commit is contained in:
David Zhao
2022-01-14 10:13:11 -08:00
committed by GitHub
parent cf830191e3
commit cd9c125414
3 changed files with 7 additions and 7 deletions
+4 -1
View File
@@ -66,7 +66,10 @@ func NewLivekitServer(conf *config.Config,
negroni.NewRecovery(),
// CORS is allowed, we rely on token authentication to prevent improper use
cors.New(cors.Options{
AllowedOrigins: []string{"*"},
AllowOriginFunc: func(origin string) bool {
return true
},
AllowedHeaders: []string{"*"},
}),
}
if keyProvider != nil {