mirror of https://github.com/torappinfo/uweb
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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);
|
|
}
|