Skip to content

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

Description

@ryoid

Duplicates

  • I have searched the existing issues

Latest version

  • 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 #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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions