From fafd955d2e361f31f1f8ec418328fdc1360f4bb1 Mon Sep 17 00:00:00 2001 From: Lars Trieloff Date: Tue, 11 Jun 2019 08:47:49 +0000 Subject: [PATCH] fix(raw): set correct content type for raw HTML responses --- layouts/fastly/helix.vcl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/layouts/fastly/helix.vcl b/layouts/fastly/helix.vcl index efbfa323..2cfe07e8 100644 --- a/layouts/fastly/helix.vcl +++ b/layouts/fastly/helix.vcl @@ -705,6 +705,9 @@ sub hlx_deliver_raw { set req.http.X-Trace = req.http.X-Trace + "; hlx_deliver_raw"; if (resp.status == 200) { set req.http.X-Trace = req.http.X-Trace + "(ok)"; + if (req.url.ext == "html") { + set resp.http.Content-Type = "text/html"; + } # TODO: fix headers (mime-type, etc.) } else { set req.http.X-Trace = req.http.X-Trace + "(fallback)";