solid-start icon indicating copy to clipboard operation
solid-start copied to clipboard

[Bug?]: http status code and headers not set when deployed

Open ryoid opened this issue 1 year ago • 0 comments

Duplicates

  • [X] I have searched the existing issues

Latest version

  • [X] I have tested the latest version

Current behavior 😯

Setting http status code and header works locally as expected. However, when deployed on Cloudflare the response is 200, without the custom header.

https://developers.cloudflare.com/pages/framework-guides/deploy-a-solid-site/

// [...404].tsx
import { HttpHeader, HttpStatusCode } from "@solidjs/start";

export default function NotFound() {
  return (
    <main>
      <HttpStatusCode code={404} />
      <HttpHeader name="x-custom-header" value="test" />
    </main>
  );
}

Might be related to https://github.com/solidjs/solid-start/issues/1643

Expected behavior 🤔

Receive the status 404 and custom header when visiting a 404 page.

Steps to reproduce 🕹

Steps:

https://developers.cloudflare.com/pages/framework-guides/deploy-a-solid-site/

  1. Create a SolidStart project with the bare template
  2. Add a <HttpHeader /> to the 404 page
  3. Deploy on Cloudflare

Context 🔦

Suffering from build assets 404 pages being cached.

Your environment 🌎

No response

ryoid avatar Nov 19 '24 18:11 ryoid