Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
Copy Accept-Encoding normalisation from EC2 Varnish
Browse files Browse the repository at this point in the history
  • Loading branch information
samsimpson1 committed May 16, 2022
1 parent daf0c0d commit 691b6dd
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec/test-outputs/www-eks-integration.out.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ sub vcl_recv {



# Strip Accept-Encoding header if the content is already compressed
if (req.http.Accept-Encoding) {
if (req.url ~ "\.(jpeg|jpg|png|gif|gz|tgz|bz2|tbz|zip|flv|pdf|mp3|ogg)$") {
remove req.http.Accept-Encoding;
}
}

# Force SSL.
if (!req.http.Fastly-SSL) {
error 801 "Force SSL";
Expand Down
7 changes: 7 additions & 0 deletions spec/test-outputs/www-eks-production.out.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,13 @@ sub vcl_recv {



# Strip Accept-Encoding header if the content is already compressed
if (req.http.Accept-Encoding) {
if (req.url ~ "\.(jpeg|jpg|png|gif|gz|tgz|bz2|tbz|zip|flv|pdf|mp3|ogg)$") {
remove req.http.Accept-Encoding;
}
}

# Force SSL.
if (!req.http.Fastly-SSL) {
error 801 "Force SSL";
Expand Down
7 changes: 7 additions & 0 deletions spec/test-outputs/www-eks-staging.out.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,13 @@ sub vcl_recv {



# Strip Accept-Encoding header if the content is already compressed
if (req.http.Accept-Encoding) {
if (req.url ~ "\.(jpeg|jpg|png|gif|gz|tgz|bz2|tbz|zip|flv|pdf|mp3|ogg)$") {
remove req.http.Accept-Encoding;
}
}

# Force SSL.
if (!req.http.Fastly-SSL) {
error 801 "Force SSL";
Expand Down
7 changes: 7 additions & 0 deletions spec/test-outputs/www-eks-test.out.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ sub vcl_recv {



# Strip Accept-Encoding header if the content is already compressed
if (req.http.Accept-Encoding) {
if (req.url ~ "\.(jpeg|jpg|png|gif|gz|tgz|bz2|tbz|zip|flv|pdf|mp3|ogg)$") {
remove req.http.Accept-Encoding;
}
}

# Force SSL.
if (!req.http.Fastly-SSL) {
error 801 "Force SSL";
Expand Down
7 changes: 7 additions & 0 deletions spec/test-outputs/www-integration.out.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ sub vcl_recv {



# Strip Accept-Encoding header if the content is already compressed
if (req.http.Accept-Encoding) {
if (req.url ~ "\.(jpeg|jpg|png|gif|gz|tgz|bz2|tbz|zip|flv|pdf|mp3|ogg)$") {
remove req.http.Accept-Encoding;
}
}

# Force SSL.
if (!req.http.Fastly-SSL) {
error 801 "Force SSL";
Expand Down
7 changes: 7 additions & 0 deletions spec/test-outputs/www-production.out.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,13 @@ sub vcl_recv {



# Strip Accept-Encoding header if the content is already compressed
if (req.http.Accept-Encoding) {
if (req.url ~ "\.(jpeg|jpg|png|gif|gz|tgz|bz2|tbz|zip|flv|pdf|mp3|ogg)$") {
remove req.http.Accept-Encoding;
}
}

# Force SSL.
if (!req.http.Fastly-SSL) {
error 801 "Force SSL";
Expand Down
7 changes: 7 additions & 0 deletions spec/test-outputs/www-staging.out.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,13 @@ sub vcl_recv {



# Strip Accept-Encoding header if the content is already compressed
if (req.http.Accept-Encoding) {
if (req.url ~ "\.(jpeg|jpg|png|gif|gz|tgz|bz2|tbz|zip|flv|pdf|mp3|ogg)$") {
remove req.http.Accept-Encoding;
}
}

# Force SSL.
if (!req.http.Fastly-SSL) {
error 801 "Force SSL";
Expand Down
7 changes: 7 additions & 0 deletions spec/test-outputs/www-test.out.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ sub vcl_recv {



# Strip Accept-Encoding header if the content is already compressed
if (req.http.Accept-Encoding) {
if (req.url ~ "\.(jpeg|jpg|png|gif|gz|tgz|bz2|tbz|zip|flv|pdf|mp3|ogg)$") {
remove req.http.Accept-Encoding;
}
}

# Force SSL.
if (!req.http.Fastly-SSL) {
error 801 "Force SSL";
Expand Down
7 changes: 7 additions & 0 deletions vcl_templates/www.vcl.erb
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,13 @@ sub vcl_recv {
}
<% end %>

# Strip Accept-Encoding header if the content is already compressed
if (req.http.Accept-Encoding) {
if (req.url ~ "\.(jpeg|jpg|png|gif|gz|tgz|bz2|tbz|zip|flv|pdf|mp3|ogg)$") {
remove req.http.Accept-Encoding;
}
}

# Force SSL.
if (!req.http.Fastly-SSL) {
error 801 "Force SSL";
Expand Down

0 comments on commit 691b6dd

Please sign in to comment.