From 8abc65c8e0b5c8ce0b20f18e17f395c50901f2cb Mon Sep 17 00:00:00 2001 From: Craig Russell Date: Wed, 19 Jun 2024 12:23:56 +0100 Subject: [PATCH] Adds CORS response header Adds `Access-Control-Allow-Origin:*` header to all responses --- server.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server.js b/server.js index 7c3ab06..dd0242a 100644 --- a/server.js +++ b/server.js @@ -435,6 +435,7 @@ class EleventyDevServer { } res.setHeader("Content-Type", contentType); + res.setHeader("Access-Control-Allow-Origin", '*'); if (contentType.startsWith("text/html")) { // the string is important here, wrapResponse expects strings internally for HTML content (for now)