nhs-england-tools / terraform-aws-opennext

🧱 💻 ☁️ A Terraform module for deploying a Next.js application built with OpenNext to AWS
MIT License
75 stars 10 forks source link

feat: adds default gzip and brotli compression, variables to allow disabling #6

Closed nicholas-c closed 11 months ago

nicholas-c commented 11 months ago

Description

Gzip and Brotli compressions are currently disabled by the Cloudfront Cache Policy resulting in Next.js not Gzipping content as the headers do not get passed to origin.

This PR enables these options by default, and sets variables to disabled if needed.

Context

This PR results in lower network data transfer by enabling Gzip and Brotli across the Cloudfront Cache Policy

Type of changes

Checklist


Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.