commit
7545f4f0f0
1 changed files with 7 additions and 0 deletions
7
index.js
7
index.js
|
|
@ -84,6 +84,13 @@ async function handleRequest(event) {
|
||||||
fetch(url, { method: 'POST', headers, body: JSON.stringify(data) }),
|
fetch(url, { method: 'POST', headers, body: JSON.stringify(data) }),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const searchParams = new URL(request.url).searchParams
|
||||||
|
url = new URL(url)
|
||||||
|
searchParams.forEach((value, key) => {
|
||||||
|
url.searchParams.append(key, value)
|
||||||
|
})
|
||||||
|
|
||||||
return new Response(null, { status: 302, headers: { Location: url } })
|
return new Response(null, { status: 302, headers: { Location: url } })
|
||||||
}
|
}
|
||||||
} else if (request.method == 'DELETE') {
|
} else if (request.method == 'DELETE') {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue