François
François

Reputation: 3274

Azure ARM - HttpsOnly for webapps

I've tried the following azure command:

az webapp update --resource-group <YourResourceGroupName> --name <YourWebAppName> --set httpsOnly=true

However I got the following response:

az: error: unrecognized arguments: --set httpsOnly=true

I'm running the command in the docker image azuresdk/azure-cli-python version 2.0.23

EDIT:

My mistake: I was not running az update but az deployment (which btw should support the httpsOnly flag IMO).

Upvotes: 1

Views: 483

Answers (1)

Jason Ye
Jason Ye

Reputation: 13954

We should use this command to set HttpsOnly for Azure Web app.

az webapp update --resource-group <YourResourceGroupName> --name <YourWebAppName> --set HttpsOnly=true

I run this command in Azure cloud shell, that works for me:

enter image description here

enter image description here

Also we can check it via Azure portal:

enter image description here

Note:

The Azure CLI version is 2.0.23, we can find the CLI 2.0 release here, we can follow this link to install Azure CLI 2.0.

Upvotes: 1

Related Questions