Description
If your service needs HTTP/2 features such as multiple concurrent requests on one connection, set site_config.http2_enabled to true. Both HTTP/1.1 and HTTP/2 can use HTTPS.
Potential impact
A client that relies on HTTP/2 may miss required features or performance targets if it connects over HTTP/1.1.
Remediation
Send an HTTPS request with a representative client and check that it negotiated HTTP/2. Review HTTPS-only enforcement, minimum TLS, certificates and user authentication separately. If you use client certificates, avoid modes and exclusion paths that need TLS renegotiation, which HTTP/2 does not support.
Examples
The second AzureRM 3.x azurerm_app_service excerpt enables HTTP/2 and sets the TLS minimum to 1.2. Current Linux and Windows Web App resources also support HTTP/2.
Before
resource "azurerm_app_service" "example" {
name = "example-app-service"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
app_service_plan_id = azurerm_app_service_plan.example.id
app_settings = {
"SOME_KEY" = "some-value"
}
}
After
resource "azurerm_app_service" "example" {
name = "example-app-service"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
app_service_plan_id = azurerm_app_service_plan.example.id
app_settings = {
"SOME_KEY" = "some-value"
}
site_config {
dotnet_framework_version = "v4.0"
scm_type = "LocalGit"
min_tls_version = 1.2
http2_enabled = true
}
}