mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix(cloudflare, lambda): preserve query parameters in url (#155)
This commit is contained in:
parent
fdc0ffef8d
commit
8cc836ebf6
@ -19,7 +19,7 @@ async function handleEvent (event) {
|
|||||||
|
|
||||||
const r = await localCall({
|
const r = await localCall({
|
||||||
event,
|
event,
|
||||||
url: url.pathname,
|
url: url.pathname + url.search,
|
||||||
host: url.hostname,
|
host: url.hostname,
|
||||||
protocol: url.protocol,
|
protocol: url.protocol,
|
||||||
headers: event.request.headers,
|
headers: event.request.headers,
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import '~polyfill'
|
import '~polyfill'
|
||||||
|
import { withQuery } from 'ufo'
|
||||||
import { localCall } from '../server'
|
import { localCall } from '../server'
|
||||||
|
|
||||||
export async function handler (event, context) {
|
export async function handler (event, context) {
|
||||||
const r = await localCall({
|
const r = await localCall({
|
||||||
event,
|
event,
|
||||||
url: event.path,
|
url: withQuery(event.path, event.queryStringParameters),
|
||||||
context,
|
context,
|
||||||
headers: event.headers,
|
headers: event.headers,
|
||||||
method: event.httpMethod,
|
method: event.httpMethod,
|
||||||
|
Loading…
Reference in New Issue
Block a user