mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 15:31:52 +00:00
Merge pull request #2379 from ZhenShuo2021/fix/forgejo-cors
🐛 Fix: forgejo CORS
This commit is contained in:
@@ -4,6 +4,12 @@
|
|||||||
const repoId = script?.getAttribute("data-repo-id");
|
const repoId = script?.getAttribute("data-repo-id");
|
||||||
|
|
||||||
if (!repoURL || !repoId) return;
|
if (!repoURL || !repoId) return;
|
||||||
|
if (repoId.startsWith("forgejo")) {
|
||||||
|
console.log(
|
||||||
|
"fetch-repo.js: Forgejo server blocks cross-origin requests. Live JavaScript updates are not supported.",
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const platforms = {
|
const platforms = {
|
||||||
github: {
|
github: {
|
||||||
@@ -69,6 +75,6 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(`fetch-repo.js: ${error}`);
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|||||||
Reference in New Issue
Block a user