az containerapp ingress cors
Commands to manage CORS policy for a container app.
Commands
Name | Description | Type | Status |
---|---|---|---|
az containerapp ingress cors disable |
Disable CORS policy for a container app. |
Core | GA |
az containerapp ingress cors enable |
Enable CORS policy for a container app. |
Core | GA |
az containerapp ingress cors show |
Show CORS policy for a container app. |
Core | GA |
az containerapp ingress cors update |
Update CORS policy for a container app. |
Core | GA |
az containerapp ingress cors disable
Disable CORS policy for a container app.
az containerapp ingress cors disable [--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Disable CORS policy for a container app.
az containerapp ingress cors disable -n my-containerapp -g MyResourceGroup
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The name of the Containerapp. A name must consist of lower case alphanumeric characters or '-', start with a letter, end with an alphanumeric character, cannot have '--', and must be less than 32 characters.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az containerapp ingress cors enable
Enable CORS policy for a container app.
az containerapp ingress cors enable --allowed-origins
[--allow-credentials {false, true}]
[--allowed-headers]
[--allowed-methods]
[--expose-headers]
[--ids]
[--max-age]
[--name]
[--resource-group]
[--subscription]
Examples
Set allowed origins and allowed methods for a container app.
az containerapp ingress cors enable -n my-containerapp -g MyResourceGroup --allowed-origins http://www.contoso.com https://www.contoso.com --allowed-methods GET POST
Set allowed origins, allowed methods and allowed headers for a container app.
az containerapp ingress cors enable -n my-containerapp -g MyResourceGroup --allowed-origins * --allowed-methods * --allowed-headers header1 header2
Required Parameters
A list of allowed origin(s) for the container app. Values are space-separated. Empty string to clear existing values.
Optional Parameters
Whether the credential is allowed for the container app.
A list of allowed header(s) for the container app. Values are space-separated. Empty string to clear existing values.
A list of allowed method(s) for the container app. Values are space-separated. Empty string to clear existing values.
A list of expose header(s) for the container app. Values are space-separated. Empty string to clear existing values.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The maximum age of the allowed origin in seconds. Only postive integer or empty string are allowed. Empty string resets max_age to null.
The name of the Containerapp. A name must consist of lower case alphanumeric characters or '-', start with a letter, end with an alphanumeric character, cannot have '--', and must be less than 32 characters.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az containerapp ingress cors show
Show CORS policy for a container app.
az containerapp ingress cors show [--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Show CORS policy for a container app.
az containerapp ingress cors show -n my-containerapp -g MyResourceGroup
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The name of the Containerapp. A name must consist of lower case alphanumeric characters or '-', start with a letter, end with an alphanumeric character, cannot have '--', and must be less than 32 characters.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az containerapp ingress cors update
Update CORS policy for a container app.
az containerapp ingress cors update [--allow-credentials {false, true}]
[--allowed-headers]
[--allowed-methods]
[--allowed-origins]
[--expose-headers]
[--ids]
[--max-age]
[--name]
[--resource-group]
[--subscription]
Examples
Update allowed origins and allowed methods for a container app while keeping other cors settings.
az containerapp ingress cors update -n my-containerapp -g MyResourceGroup --allowed-origins http://www.contoso.com https://www.contoso.com --allowed-methods GET POST
Optional Parameters
Whether the credential is allowed for the container app.
A list of allowed header(s) for the container app. Values are space-separated. Empty string to clear existing values.
A list of allowed method(s) for the container app. Values are space-separated. Empty string to clear existing values.
A list of allowed origin(s) for the container app. Values are space-separated. Empty string to clear existing values.
A list of expose header(s) for the container app. Values are space-separated. Empty string to clear existing values.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
The maximum age of the allowed origin in seconds. Only postive integer or empty string are allowed. Empty string resets max_age to null.
The name of the Containerapp. A name must consist of lower case alphanumeric characters or '-', start with a letter, end with an alphanumeric character, cannot have '--', and must be less than 32 characters.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Azure CLI