Skip to content
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.

Commit

Permalink
fix(raw): set correct content type for raw HTML responses
Browse files Browse the repository at this point in the history
  • Loading branch information
trieloff committed Jun 11, 2019
1 parent 2052409 commit fafd955
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions layouts/fastly/helix.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -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)";
Expand Down

0 comments on commit fafd955

Please sign in to comment.