ThreeDotsLabs / wild-workouts-go-ddd-example

Go DDD example application. Complete project to show how to apply DDD, Clean Architecture, and CQRS by practical refactoring.
https://threedots.tech
MIT License
5.24k stars 479 forks source link

Fix CORS middleware allowed origins check #66

Open stavhaygn opened 1 year ago

stavhaygn commented 1 year ago

This PR fixes an issue in the addCorsMiddleware function where the if condition would never evaluate to true. The updated check ensures that the CORS middleware is applied only when the CORS_ALLOWED_ORIGINS environment variable is set and not empty.