Introduce CORS configuration using allowed origins from appsettings.json. Updated Program.cs to read allowed origins from configuration and apply them to the CORS policy, defaulting to AllowAnyOrigin if none are specified. Also made minor formatting and comment improvements.
19 lines
413 B
JSON
19 lines
413 B
JSON
{
|
|
"ConnectionStrings": {
|
|
"DefaultConnection": "Server=SDD-VMP04-SQL17\\DD_DEVELOP01;Database=DD_ECM;User Id=sa;Password=dd;TrustServerCertificate=True;"
|
|
},
|
|
"Cors": {
|
|
"AllowedOrigins": [
|
|
"https://localhost:7276",
|
|
"http://localhost:5101"
|
|
]
|
|
},
|
|
"Logging": {
|
|
"LogLevel": {
|
|
"Default": "Information",
|
|
"Microsoft.AspNetCore": "Warning"
|
|
}
|
|
},
|
|
"AllowedHosts": "*"
|
|
}
|