ClickHouse/website/workers/repo.js

11 lines
269 B
JavaScript
Raw Normal View History

2020-02-20 13:33:19 +00:00
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
let url = new URL(request.url);
url.hostname = 'repo.yandex.ru';
url.pathname = '/clickhouse' + url.pathname;
return fetch(url)
}