Skip to content

Azure Function App doesn't use HTTP 2.0

Description

This policy identifies Azure Function App which doesn't use HTTP 2.0. HTTP 2.0 has additional performance improvements on the head-of-line blocking problem of the old HTTP version, header compression, and prioritization of requests. HTTP 2.0 no longer supports HTTP 1.1's chunked transfer encoding mechanism, as it provides its own, more efficient, mechanisms for data streaming.

Code Example

text
{
 " - az functionapp config set --http20-enable true --name MyFunctionApp --resource-group MyResourceGroup
",
}

Remediation

  • In Azure Console*

. Log in to the Azure portal

. Navigate to Function App

. Click on the reported Function App

. Under Setting section, Click on 'Configuration'

. Under 'General Settings' tab, In 'Platform settings', Set 'HTTP version' to '2.0'

. Click on 'Save'.

  • In Azure CLI*

If Function App Hosted in Linux using Consumption (Serverless) Plan follow below steps Azure CLI Command

Rule Details

FieldValue
IDIAC-0575
SeverityINFO
IaC Typearm
FrameworksTerraform, TerraformPlan
Checkov IDCKV_AZURE_67

References