-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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(remix-server-runtime): inherit parent route's headers
if child route doesn't export headers
#5473
feat(remix-server-runtime): inherit parent route's headers
if child route doesn't export headers
#5473
Conversation
|
Hi @appden, Welcome, and thank you for contributing to Remix! Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once. You may review the CLA and sign it by adding your name to contributors.yml. Once the CLA is signed, the If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at hello@remix.run. Thanks! - The Remix team |
This PR has been automatically marked stale because we haven't received a response from the original author in a while 🙈. This automation helps keep the issue tracker clean from issues that are not actionable. Please reach out if you have more information for us or you think this issue shouldn't be closed! 🙂 If you don't do so within 7 days, this PR will be automatically closed. |
headers
if child route doesn't export headers
dddf0c6
to
4f34321
Compare
Hi @appden! Are you still interested in getting this one merged? If so, please rebase onto latest |
4f34321
to
dfe97fc
Compare
Thanks @MichaelDeBoey, I just rebased and fixed that type error for the tests. If this proposal sounds good (I recall @ryanflorence also wanted to take a look), I can add a test for this new functionality and also update to default this new flag to |
dfe97fc
to
38136de
Compare
@MichaelDeBoey @ryanflorence kindly following up on this, thanks! |
I've found it very surprising and have been bitten a few times that a parent route's headers are not automatically used by a child route when that child route does not export its own `headers`. This proposes doing just that for v2 since this would be a breaking change.
38136de
to
6763cad
Compare
Thanks @appden! It turns out this was never the intentional behavior, and prior to the v1 release it behaved the way you would expect (the way this Pr is changing it to behave). We agree it's best to put this behind a v2 flag since it released in v1 with the current behavior. This is going to change/conflict slightly with some work I just merged for |
Awesome, thanks @brophdawg11! |
Continued in #6431 |
I've found it very surprising and have been bitten a few times that a parent route's headers are not automatically used by a child route when that child route does not export its own
headers
. This proposes doing just that for v2 since this would be a breaking change.