Skip to content

Lambda@Edge for serving Brotli or Gzipped file according to the Accept-Encoding header

License

Notifications You must be signed in to change notification settings

SUI-Components/lambda-edge-serve-compressed-file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lambda-edge-serve-compressed-file

Lambda@Edge for serving Brotli or Gzipped file according to the Content-Encoding header. It supports CSS and JS files.

Requirements

  1. Use S3 && Cloudfront
  2. You MUST upload your CSS & JS files already compressed to the bucked. In other words, you MUST upload the same file three times: without compression, compressed with Brotli (and .br extension), compressed with Gzip (and .gzip compression).
  3. You MUST deactivate gzip on-the-fly compression from CloudFront settings.
  4. Use this Lambda@Edge in order to intercept Requests for CloudFront.

Useful resources: Get Lambda Event Source Gist

Releases

No releases published

Packages

No packages published