Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

nicholas-c
Copy link
Contributor

@nicholas-c nicholas-c commented Aug 4, 2023

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

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

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.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

Copy link
Collaborator

@Tomdango Tomdango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Nicholas,

These changes look good to me 👍 Thank you for your contribution! ❤️

@Tomdango Tomdango force-pushed the feature/options-cloudfront-compression branch from a0fe898 to 06f3739 Compare August 7, 2023 09:38
@Tomdango Tomdango enabled auto-merge August 7, 2023 09:39
@Tomdango Tomdango disabled auto-merge August 7, 2023 09:40
@Tomdango Tomdango merged commit db95da3 into nhs-england-tools:main Aug 7, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants