-
Notifications
You must be signed in to change notification settings - Fork 186
Add basic SvelteKit support #56
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
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
||
// https://github.com/jthegedus/svelte-adapter-firebase/blob/main/src/files/firebase-to-svelte-kit.js | ||
function toSvelteKitRequest(request: Request) { | ||
// Firebase sometimes omits the protocol used. Default to http. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gen2 functions should handle x-forwarded correctly, so these lines shouldn't be needed any longer—give it a spin in prod though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I can tell, this seems to be on the only way to get the actual full host
to pass as the base in the URL
constructor that follows. I couldn't find a way to piece together the host
without using these headers.
Can you write tests for the 3 functions you are introducing? |
The deployed demo app is not totally functional yet. The Wordle clone doesn't work, I think due to some issues with cookies. It works fine locally, just seeing issues when deployed. I'm investigating further. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the build error in the tests, think we need to bump the Vite dep to 4
Tested with SvelteKit demo app, which includes static and server-side rendered pages, API routes, and form actions.