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 popular file endings
Browse files Browse the repository at this point in the history
  • Loading branch information
trieloff committed Jun 11, 2019
1 parent fafd955 commit 1455d3f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions layouts/fastly/helix.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,18 @@ sub hlx_deliver_raw {
if (req.url.ext == "html") {
set resp.http.Content-Type = "text/html";
}
if (req.url.ext == "css") {
set resp.http.Content-Type = "text/css";
}
if (req.url.ext == "js") {
set resp.http.Content-Type = "text/javascript";
}
if (req.url.ext == "json") {
set resp.http.Content-Type = "application/json";
}
if (req.url.ext == "xml") {
set resp.http.Content-Type = "application/xml";
}
# TODO: fix headers (mime-type, etc.)
} else {
set req.http.X-Trace = req.http.X-Trace + "(fallback)";
Expand Down

0 comments on commit 1455d3f

Please sign in to comment.