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

feat: HTTP Header React Component #460

Closed
aheissenberger opened this issue Feb 6, 2024 · 1 comment
Closed

feat: HTTP Header React Component #460

aheissenberger opened this issue Feb 6, 2024 · 1 comment

Comments

@aheissenberger
Copy link
Contributor

Add a Component <HttpHeader name="Cache-Control" value="max-age=3600" /> which allows to set a HTTP header from a React Component.

Example:

import { HttpHeader } from "waku/utils";

export default function About(props) {
  return (
    <>
      <HttpHeader name="Cache-Control" value="max-age=3600" />
        <h1>About</h1>
    </>
  );
}
@dai-shi
Copy link
Owner

dai-shi commented Feb 6, 2024

I'll be working on #329 related to this.
However, is too tricky & too hard to implement. So, it won't be like that. Only what React supports will be supported.

You could change the default headers with config.htmlHead for now.

@dai-shi dai-shi closed this as not planned Won't fix, can't repro, duplicate, stale Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants