This commit is contained in:
Iron_Felix 2025-12-04 07:40:21 +03:00
parent 61db4ff54d
commit 570be2a68b
2 changed files with 3 additions and 1 deletions

View file

@ -64,6 +64,7 @@ services:
DATABASE_URL: ${DATABASE_URL} DATABASE_URL: ${DATABASE_URL}
SERVICE_ADDRESS: ${SERVICE_ADDRESS} SERVICE_ADDRESS: ${SERVICE_ADDRESS}
JWT_PRIVATE_KEY: ${JWT_PRIVATE_KEY} JWT_PRIVATE_KEY: ${JWT_PRIVATE_KEY}
RABBITMQ_URL: ${RABBITMQ_URL}
ports: ports:
- "8082:8082" - "8082:8082"
depends_on: depends_on:

View file

@ -63,7 +63,8 @@ func main() {
server := handlers.NewServer(queries, publisher, rpcClient) server := handlers.NewServer(queries, publisher, rpcClient)
r.Use(cors.New(cors.Config{ r.Use(cors.New(cors.Config{
AllowOrigins: []string{AppConfig.ServiceAddress}, // AllowOrigins: []string{AppConfig.ServiceAddress},
AllowOrigins: []string{"*"},
AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "PATCH"}, AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "PATCH"},
AllowHeaders: []string{"Origin", "Content-Type", "Accept"}, AllowHeaders: []string{"Origin", "Content-Type", "Accept"},
ExposeHeaders: []string{"Content-Length"}, ExposeHeaders: []string{"Content-Length"},