Merge pull request #1249 from ICE-GB/fix-1247

修复issue #1247: 使用反向代理有子路径时,serviceWorker的scope错误
This commit is contained in:
Spmario233 2024-04-21 16:29:01 +08:00 committed by GitHub
commit 97b32bf62e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -244,7 +244,7 @@ new Promise((resolve) => {
"serviceWorker" in navigator
) {
let scope =
window.location.protocol + "//" + window.location.host + "/";
window.location.protocol + "//" + window.location.host + window.location.pathname;
navigator.serviceWorker
.getRegistrations()
.then(async (registrations) => {