No need to rewrite to index.html

This commit is contained in:
RMidhunSuresh 2022-04-22 12:07:53 +05:30
parent b6e55ef59c
commit 826835e518

View file

@ -124,11 +124,6 @@ async function handleRequest(request) {
} }
async function handleConfigRequest(request) { async function handleConfigRequest(request) {
const url = new URL(request.url);
// rewrite / to /index.html so it hits the cache
if (url.origin === baseURL.origin && url.pathname === baseURL.pathname) {
request = new Request(new URL("index.html", baseURL.href));
}
let response = await readCache(request); let response = await readCache(request);
if (response) { if (response) {
fetchAndUpdateConfig(request); fetchAndUpdateConfig(request);