export default {
async fetch(req: WorkerRequest, _env: unknown, _ctx: WorkerExecutionContext) {
const init: RequestInit = {
body: req.body,
headers: {
"User-Agent": req.headers.get("User-Agent")!,
},
method: 'POST',
}
let path = new URL(req.url).pathname
let address = 'https://pythondiscord.report-uri.com' + path
let response = await fetch(address, init);
return new Response(response.body, {
status: response.status,
statusText: response.statusText
})
}
}
export default {
async fetch(req: WorkerRequest, _env: unknown, _ctx: WorkerExecutionContext) {
const init: RequestInit = {
body: req.body,
headers: {
"User-Agent": req.headers.get("User-Agent")!,
},
method: 'POST',
}
let path = new URL(req.url).pathname
let address = 'https://pythondiscord.report-uri.com' + path
let response = await fetch(address, init);
return new Response(response.body, {
status: response.status,
statusText: response.statusText
})
}
}