Skip to content

Commit

Permalink
feat: add check for HELIUM_PRIVATE_ENABLE_ASSET_PROXY to determine if…
Browse files Browse the repository at this point in the history
… asset urls should be rewritten
  • Loading branch information
rjschill87 committed Feb 12, 2024
1 parent ecf48be commit fd2ae31
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tooling/helium-server/worker/ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ async function handleSsr(url, authToken = null, userAndAppearanceToken = null) {
} else {
const { statusCode, body } = httpResponse;
const headers = assembleHeaders(pageContext);
const resBody =
HELIUM_PRIVATE_ENABLE_ASSET_PROXY === 'true' ? body : resolveAssetUrls(url, body);

return new Response(resolveAssetUrls(url, body), {
return new Response(resBody, {
headers,
status: statusCode
});
Expand Down

0 comments on commit fd2ae31

Please sign in to comment.