File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 52
52
if (!beresp.http.Vary ~ " Accept-Encoding" ) {
53
53
set beresp.http.Vary :Accept-Encoding = " " ;
54
54
}
55
- if (req.http.Accept-Encoding == " gzip" ) {
55
+ if (req.http.Accept-Encoding == " br" ) {
56
+ set beresp.brotli = true ;
57
+ } else if (req.http.Accept-Encoding == " gzip" ) {
56
58
set beresp.gzip = true ;
57
59
}
58
60
}
Original file line number Diff line number Diff line change 106
106
set req.http.Https = " on" ;
107
107
}
108
108
109
+ # Add support for Brotli static compression
110
+ if (req.http.Fastly-Orig-Accept-Encoding ) {
111
+ if (req.http.Fastly-Orig-Accept-Encoding ~ " \bbr\b" ) {
112
+ set req.http.Accept-Encoding = " br" ;
113
+ }
114
+ }
115
+
109
116
if (fastly.ff.visits_this_service > 0 ) {
110
117
# disable ESI processing on Origin Shield
111
118
set req.esi = false ;
You can’t perform that action at this time.
0 commit comments