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

Expose rawBody #1109

Merged
merged 17 commits into from
Apr 18, 2021
Prev Previous commit
use getRawBody in adapter-vercel
  • Loading branch information
Rich-Harris committed Apr 18, 2021
commit 18afc8af5cec478882c16ff73bcbeb63110d27b8
5 changes: 5 additions & 0 deletions .changeset/unlucky-wasps-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-vercel': patch
---

Use getRawBody in adapter-vercel
4 changes: 2 additions & 2 deletions packages/adapter-vercel/files/entry.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { get_body } from '@sveltejs/kit/http'; // eslint-disable-line import/no-unresolved
import { getRawBody } from '@sveltejs/kit/http'; // eslint-disable-line import/no-unresolved
import '@sveltejs/kit/install-fetch'; // eslint-disable-line import/no-unresolved

// TODO hardcoding the relative location makes this brittle
Expand All @@ -12,7 +12,7 @@ export default async (req, res) => {
headers: req.headers,
path: pathname,
query: searchParams,
body: await get_body(req)
body: await getRawBody(req)
});

if (rendered) {
Expand Down