jthegedus / svelte-adapter-firebase

SvelteKit adapter for Firebase Hosting rewrites to Cloud Functions for a Svelte SSR experience

Home Page:https://github.com/jthegedus/svelte-adapter-firebase

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bug: any response headers from SvelteKit are not passed to express on Node.js v16 runtime

co3k opened this issue · comments

Describe the Bug

src/files/entry.js sets response headers by using express.Response#writeHead(...) and the current implementation passes an instance of the Headers (node-fetch) however it does not works correctly my Node.js v16 runtime.

Steps to Reproduce

  1. create Firebase Functions (runtime: node16)
  2. create SvelteKit project and its endpoint with any custom response headers
  3. deploy
  4. access to the deployed function but you cannot get the custom headers of the response

Expected Behaviour

the deployed function responses content with the headers which are specified by SvelteKit project

svelte-adapter-firebase version

0.14.0

sveltejs/kit version

1.0.0-next.335

Can you share a code sample of a custom header? It would be good to add something to the test suite to ensure this doesn't break in future