tf: allow CORS GET requests
Fixes #156
zimbatm committed
Sep 3, 2021 at 10:17 UTC
7d5ff0a5526edeedcf22a39f50fd72e12a137f65
4 files changed
+36
terraform/cache.tf
+9
@@ -172,6 +172,15 @@ resource "fastly_service_v1" "cache" {
172
name = "remove x-amz-id-2"
173
}
174
175
+ # Allow CORS GET requests.
176
+ header {
177
+ destination = "http.access-control-allow-origin"
178
+ type = "cache"
179
+ action = "set"
180
+ name = "CORS Allow"
181
+ source = "\"*\""
182
+ }
183
+
184
response_object {
185
cache_condition = "Generated by synthetic response for 404 page"
186
content = "404"
terraform/channels.tf
+9
@@ -221,6 +221,15 @@ resource "fastly_service_v1" "channels" {
221
name = "remove x-amz-id-2"
222
}
223
224
+ # Allow CORS GET requests.
225
+ header {
226
+ destination = "http.access-control-allow-origin"
227
+ type = "cache"
228
+ action = "set"
229
+ name = "CORS Allow"
230
+ source = "\"*\""
231
+ }
232
+
233
response_object {
234
cache_condition = "Generated by synthetic response for 404 page"
235
content = "404"
terraform/nixpkgs-tarballs.tf
+9
@@ -296,6 +296,15 @@ resource "fastly_service_v1" "nixpkgs-tarballs" {
296
name = "remove x-amz-id-2"
297
}
298
299
+ # Allow CORS GET requests.
300
+ header {
301
+ destination = "http.access-control-allow-origin"
302
+ type = "cache"
303
+ action = "set"
304
+ name = "CORS Allow"
305
+ source = "\"*\""
306
+ }
307
+
308
response_object {
309
cache_condition = "Generated by synthetic response for 404 page"
310
content = "404"
terraform/releases.tf
+9
@@ -212,6 +212,15 @@ resource "fastly_service_v1" "releases" {
212
name = "remove x-amz-id-2"
213
}
214
215
+ # Allow CORS GET requests.
216
+ header {
217
+ destination = "http.access-control-allow-origin"
218
+ type = "cache"
219
+ action = "set"
220
+ name = "CORS Allow"
221
+ source = "\"*\""
222
+ }
223
+
224
response_object {
225
cache_condition = "Generated by synthetic response for 404 page"
226
content = "404"