Fixes #14824.
Simplify by just checking if we're still on the current pathname
---------
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
--- /dev/null
+---
+'@sveltejs/kit': patch
+---
+
+fix: allow hosting hash-based apps from non-index.html files
}
if (hash_routing) {
- if (url.pathname === base + '/' || url.pathname === base + '/index.html') {
- return false;
- }
-
- // be lenient if serving from filesystem
- if (url.protocol === 'file:' && url.pathname.replace(/\/[^/]+\.html?$/, '') === base) {
- return false;
- }
-
- return true;
+ return url.pathname !== location.pathname;
}
return false;