You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It can be useful to configure CORS via environment variables, such as when running in a container. Would be great to allow this.
Describe the solution you'd like
Allow CORS configuration via environment variables when running outside Linux consumption.
Describe alternatives you've considered
Setting a variable named CONTAINER_NAME will cause the host to go down the same code path as Linux consumption, but on environments such as Container Apps or Kubernetes, setting that variable will provide the same container name to all running replicas/pods. This might have unintended consequences if other parts of the host uses the container name and expects it to be unique per host instance.
What problem would the feature you're requesting solve? Please describe.
Currently, it's possible to configure CORS via environment variables, but the variables are only used when running in Linux consumption:
azure-functions-host/src/WebJobs.Script.WebHost/Configuration/CorsOptionsSetup.cs
Line 26 in 172c57f
It can be useful to configure CORS via environment variables, such as when running in a container. Would be great to allow this.
Describe the solution you'd like
Allow CORS configuration via environment variables when running outside Linux consumption.
Describe alternatives you've considered
Setting a variable named
CONTAINER_NAME
will cause the host to go down the same code path as Linux consumption, but on environments such as Container Apps or Kubernetes, setting that variable will provide the same container name to all running replicas/pods. This might have unintended consequences if other parts of the host uses the container name and expects it to be unique per host instance.Additional context
Thread: https://hachyderm.io/@anthonychu/109400532768512364
The text was updated successfully, but these errors were encountered: