fix: AllowOrigins

This commit is contained in:
nihonium 2025-12-04 07:35:49 +03:00
parent b03f9c9704
commit 066c44d08a
Signed by: nihonium
GPG key ID: 0251623741027CFC

View file

@ -44,8 +44,9 @@ func main() {
server := handlers.NewServer(queries, AppConfig.JwtPrivateKey)
log.Info("allow origins:", AppConfig.ServiceAddress)
r.Use(cors.New(cors.Config{
AllowOrigins: []string{AppConfig.ServiceAddress},
AllowOrigins: []string{"*"},
AllowMethods: []string{"GET", "POST", "PUT", "DELETE"},
AllowHeaders: []string{"Origin", "Content-Type", "Accept"},
ExposeHeaders: []string{"Content-Length"},