added testing
This commit is contained in:
@@ -38,7 +38,7 @@ export const ALL: APIRoute = async ({ request, params }) => {
|
||||
|
||||
if (request.method !== 'GET' && request.method !== 'HEAD' && request.body) {
|
||||
fetchOptions.body = request.body;
|
||||
// @ts-ignore — required by Node fetch when body is a stream
|
||||
// @ts-expect-error — required by Node fetch when body is a stream
|
||||
fetchOptions.duplex = 'half';
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ export const ALL: APIRoute = async ({ request, params }) => {
|
||||
if (FORBIDDEN_RESPONSE_HEADERS.has(k)) return;
|
||||
responseHeaders.set(key, value);
|
||||
});
|
||||
// @ts-ignore — getSetCookie is on Node fetch's Headers
|
||||
// @ts-expect-error — getSetCookie is on Node fetch's Headers
|
||||
const setCookies: string[] = response.headers.getSetCookie?.() ?? [];
|
||||
for (const c of setCookies) {
|
||||
responseHeaders.append('set-cookie', c);
|
||||
|
||||
Reference in New Issue
Block a user