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

fix: Forwarded event fetch request having double headers in Nuxt/SEO module (triggered in server middleware) #400

Closed
Xenossolitarius opened this issue Jan 16, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@Xenossolitarius
Copy link
Contributor

🐛 The bug

If you have a server middleware in the latest version of H3. and using sitemaps this triggers the error and it breaks.
I think this is a H3 upstream issue but I will open it here too for visibility.
Check bottom issue. It's a bit too much for me to fix. I've just ignored the '/api' routes for now but not everybody can do it.

unjs/h3#956

🛠️ To reproduce

http://easy-to-reproduce.com

🌈 Expected behavior

No errors

ℹ️ Additional context

No response

@Applelo
Copy link

Applelo commented Jan 21, 2025

For people looking for a temporary fix, put this into your package.json and run pnpm install

"pnpm": {
    "overrides": {
      "h3": "1.13.0"
    }
  }

@Xenossolitarius
Copy link
Contributor Author

The cause of the issue is maybe downstream. It all depends on which package owner decides who wnats to fix it. Either we send host header in lowercase or h3 merges these headers differently. One of the workarounds is to just ignore sitemap fetches in nuxt/nitro middleware

@harlan-zw
Copy link
Collaborator

Happy to lowercase 👍 Have pushed up a release with that.

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

Successfully merging a pull request may close this issue.

3 participants