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

Minimal req.headers on firebase environment #3035

Open
vis97c opened this issue Jan 24, 2025 · 0 comments
Open

Minimal req.headers on firebase environment #3035

vis97c opened this issue Jan 24, 2025 · 0 comments

Comments

@vis97c
Copy link

vis97c commented Jan 24, 2025

Environment

  • Operating System: Windows_NT
  • Node Version: v18.20.4
  • Nuxt Version: 3.14.1592
  • CLI Version: 3.15.0
  • Nitro Version: 2.10.4
  • Package Manager: yarn@4.2.2
  • Builder: -
  • User Config: default
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://stackblitz.com/~/github.com/vis97c/nitro-firebase-host
https://github.com/vis97c/nitro-firebase-host

Describe the bug

In a firebase project (nitro preset: firebase) try to log headers.host or x-forwarded-host. The expected result should be the original request host but instead we get "localhost"

Additional context

A firebase project with admin sdk is required

Logs

Google clouds prints the following for console.log(event.node.res.req.headers)

{
  'cache-control': 'public, max-age=120, stale-while-revalidate=60',
  host: 'localhost'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant