dotnet / aspire

An opinionated, cloud ready stack for building observable, production ready, distributed applications in .NET
https://learn.microsoft.com/dotnet/aspire
MIT License
3.63k stars 409 forks source link

CORS gets null after azd deploy #5029

Open umnex opened 1 month ago

umnex commented 1 month ago

Is there an existing issue for this?

Describe the bug

I am using Azure DevOps Pipelines to deploy Aspire. Once the container app is deployed, I use Azure portal to set CORS. After subsequent deployment, the CORS get empty.

Expected Behavior

CORS should be persisted across deployments.

Steps To Reproduce

  1. Deploy an Aspire App using azd deploy
  2. set CORS values using azure portal
  3. Deploy the App again
  4. Verify CORS in azure portal
  5. CORS will be empty

Exceptions (if any)

No response

.NET Version info

No response

Anything else?

No response

umnex commented 1 month ago

Is there any update on this? I also tried setting an Environment Variable named CORS_ALLOWED_ORIGINS with an array containing the hosts but it doesn't work.