Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks done
ryoid opened this issue Nov 19, 2024 · 0 comments
Open
2 tasks done

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

ryoid opened this issue Nov 19, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ryoid
Copy link
Contributor

ryoid commented Nov 19, 2024

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

@ryoid ryoid added the bug Something isn't working label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant