Closed Sidharth-Singh10 closed 1 day ago
Thanks!
Hey @sparshg , Would it be ok if you were to merge the PR on the 1st of October?. I want it to be counted as a Hacktoberfest contribution
The PR would have been counted as out of bounds anyways since this was created before 1st Oct. See here
My bad, thanks for the info!!!
hey @sparshg
This PR adds support for configuring CORS allowed origins from the
.env
file. Instead of hardcoding the origins in the code, the backend can now dynamically read the origins from the environment, making it easier to manage in different environments (development, staging, production).Changes:
ALLOWED_ORIGINS
variable from the.env
file.Vec<String>
.CorsLayer
with the parsed origins.Example
.env
configuration:ALLOWED_ORIGINS="http://example.com,http://localhost:3000,yourec2instance"