mirror of
https://gitee.com/butubb8/blowfish.git
synced 2025-12-05 14:17:50 +08:00
fix: forgejo CORS
This commit is contained in:
@@ -4,6 +4,12 @@
|
||||
const repoId = script?.getAttribute("data-repo-id");
|
||||
|
||||
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 = {
|
||||
github: {
|
||||
@@ -52,6 +58,6 @@
|
||||
if (element) element.innerHTML = data[dataField];
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
console.error(`fetch-repo.js: ${error}`);
|
||||
}
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user