@cryptotaxi247 / infra / commits / 02890445

tf: remove headers from Amazon

Save a tiny bit of bandwidth and remove noise.

zimbatm committed Sep 3, 2021 at 10:00 UTC 02890445a54576d8a8f7b22a8b4b2f09bca879c9
4 files changed +80
terraform/cache.tf
+20
@@ -152,6 +152,26 @@ resource "fastly_service_v1" "cache" {
152 type = "request"
153 }
154
155 + # Clean headers for caching
156 + header {
157 + destination = "http.x-amz-request-id"
158 + type = "cache"
159 + action = "delete"
160 + name = "remove x-amz-request-id"
161 + }
162 + header {
163 + destination = "http.x-amz-version-id"
164 + type = "cache"
165 + action = "delete"
166 + name = "remove x-amz-version-id"
167 + }
168 + header {
169 + destination = "http.x-amz-id-2"
170 + type = "cache"
171 + action = "delete"
172 + name = "remove x-amz-id-2"
173 + }
174 +
175 response_object {
176 cache_condition = "Generated by synthetic response for 404 page"
177 content = "404"
terraform/channels.tf
+20
@@ -201,6 +201,26 @@ resource "fastly_service_v1" "channels" {
201 type = "request"
202 }
203
204 + # Clean headers for caching
205 + header {
206 + destination = "http.x-amz-request-id"
207 + type = "cache"
208 + action = "delete"
209 + name = "remove x-amz-request-id"
210 + }
211 + header {
212 + destination = "http.x-amz-version-id"
213 + type = "cache"
214 + action = "delete"
215 + name = "remove x-amz-version-id"
216 + }
217 + header {
218 + destination = "http.x-amz-id-2"
219 + type = "cache"
220 + action = "delete"
221 + name = "remove x-amz-id-2"
222 + }
223 +
224 response_object {
225 cache_condition = "Generated by synthetic response for 404 page"
226 content = "404"
terraform/nixpkgs-tarballs.tf
+20
@@ -276,6 +276,26 @@ resource "fastly_service_v1" "nixpkgs-tarballs" {
276 type = "request"
277 }
278
279 + # Clean headers for caching
280 + header {
281 + destination = "http.x-amz-request-id"
282 + type = "cache"
283 + action = "delete"
284 + name = "remove x-amz-request-id"
285 + }
286 + header {
287 + destination = "http.x-amz-version-id"
288 + type = "cache"
289 + action = "delete"
290 + name = "remove x-amz-version-id"
291 + }
292 + header {
293 + destination = "http.x-amz-id-2"
294 + type = "cache"
295 + action = "delete"
296 + name = "remove x-amz-id-2"
297 + }
298 +
299 response_object {
300 cache_condition = "Generated by synthetic response for 404 page"
301 content = "404"
terraform/releases.tf
+20
@@ -192,6 +192,26 @@ resource "fastly_service_v1" "releases" {
192 type = "request"
193 }
194
195 + # Clean headers for caching
196 + header {
197 + destination = "http.x-amz-request-id"
198 + type = "cache"
199 + action = "delete"
200 + name = "remove x-amz-request-id"
201 + }
202 + header {
203 + destination = "http.x-amz-version-id"
204 + type = "cache"
205 + action = "delete"
206 + name = "remove x-amz-version-id"
207 + }
208 + header {
209 + destination = "http.x-amz-id-2"
210 + type = "cache"
211 + action = "delete"
212 + name = "remove x-amz-id-2"
213 + }
214 +
215 response_object {
216 cache_condition = "Generated by synthetic response for 404 page"
217 content = "404"