Initial upload to Gitea
This commit is contained in:
1 parent
78193254ad
commit
8478998cae
1485 files changed
+461025
-42348
No files matched your search
+7
-1
@@ -7,7 +7,7 @@ const crypto = require("crypto");
|
||||
const STEALTH_CONFIG_PATH = path.join(__dirname, "..", "data", "stealth.json");
|
||||
const DEFAULT_COOKIE_NAME = "adpanel_gate";
|
||||
const DEFAULT_STEALTH_CONFIG = {
|
||||
enabled: true,
|
||||
enabled: false,
|
||||
cookieName: DEFAULT_COOKIE_NAME,
|
||||
cookieSecret: "",
|
||||
cookieTtlDays: 30,
|
||||
@@ -103,6 +103,11 @@ function ensureStealthConfig(defaults = {}) {
|
||||
return merged;
|
||||
}
|
||||
|
||||
function sendPublicNotFound(_req, res) {
|
||||
res.setHeader("Cache-Control", "no-store");
|
||||
return res.status(404).type("text/plain").send("Not Found");
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
DEFAULT_COOKIE_NAME,
|
||||
DEFAULT_STEALTH_CONFIG,
|
||||
@@ -111,4 +116,5 @@ module.exports = {
|
||||
loadStealthConfig,
|
||||
saveStealthConfig,
|
||||
sanitizeCookieName,
|
||||
sendPublicNotFound,
|
||||
};
|
||||
Reference in new issue
Block a user