For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/code_security/iac_security/iac_rules/terraform-azure-app-service-http2-disabled.md.
A documentation index is available at /llms.txt.
Enabling HTTP/2 for Azure App Service is essential for improved security and performance, as HTTP/2 offers better data encryption, reduced latency, and protection against certain protocol-level attacks. If the http2_enabled attribute is not set to true in the site_config block, as shown below, the app service will only support HTTP/1.1, making it more vulnerable to downgrade attacks and less efficient in handling modern web traffic.
site_config {
http2_enabled = true
}
Neglecting to enable HTTP/2 may expose applications to increased risks and degrade the overall performance and user experience.