mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-07 17:01:23 +08:00
Include only nessacary data in webhook
This commit is contained in:
@@ -11,7 +11,7 @@ if (nodeVersion < requiredVersion) {
|
||||
}
|
||||
|
||||
const args = require("args-parser")(process.argv);
|
||||
const { sleep, log, getRandomInt, genSecret, debug } = require("../src/util");
|
||||
const { sleep, log, getRandomInt, genSecret, debug, isDev } = require("../src/util");
|
||||
const config = require("./config");
|
||||
|
||||
log.info("server", "Welcome to Uptime Kuma");
|
||||
@@ -235,6 +235,13 @@ try {
|
||||
}
|
||||
});
|
||||
|
||||
if (isDev) {
|
||||
app.post("/test-webhook", async (request, response) => {
|
||||
log.debug("test", request.body);
|
||||
response.send("OK");
|
||||
});
|
||||
}
|
||||
|
||||
// Robots.txt
|
||||
app.get("/robots.txt", async (_request, response) => {
|
||||
let txt = "User-agent: *\nDisallow:";
|
||||
|
Reference in New Issue
Block a user