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

Use setHeader() instead of addHeader() to avoid multiple headers being set #92

Merged

Conversation

johannesg
Copy link
Contributor

For some reason that I haven't figured out, the authentication entrypoint is called twice for me whenever a user isn't logged. Since the entrypoint uses addHeader() it will result in two HX-Refresh headers in the response, making htmx ignore the header.

Even though there's probably something wrong with my code, changing it to use setHeader() will work around this and make sure there is only one HX-Refresh header in the response, making htmx behave as it should.

And thank you for a great library!

@wimdeblauwe wimdeblauwe added this to the 3.2.0 milestone Dec 10, 2023
@wimdeblauwe wimdeblauwe merged commit 937cddb into wimdeblauwe:main Dec 10, 2023
1 check passed
@johannesg johannesg deleted the use-set-header-instead-of-add branch December 11, 2023 09:21
@wimdeblauwe
Copy link
Owner

3.2.0 is now released with this fix.

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

Successfully merging this pull request may close these issues.

2 participants