mirror of
https://github.com/torappinfo/uweb.git
synced 2025-01-15 08:31:00 +01:00
17 lines
332 B
JavaScript
17 lines
332 B
JavaScript
export default {
|
|
async fetch(req, _env) {
|
|
let url = req.url;
|
|
let iSlash = url.indexOf('/',11);
|
|
let nUrl = url.substring(iSlash+1);
|
|
return await goUrl(req, nUrl);
|
|
}
|
|
}
|
|
|
|
async function goUrl(request, url) {
|
|
let fp = {
|
|
method: request.method,
|
|
headers: request.headers
|
|
};
|
|
return await fetch(url, fp);
|
|
}
|