llonebot-dist 7.8.4 → 7.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/llbot.js
CHANGED
|
@@ -7207,7 +7207,7 @@ class WebUITokenUtil {
|
|
|
7207
7207
|
}
|
|
7208
7208
|
const webuiTokenUtil = new WebUITokenUtil(path__default.join(DATA_DIR, "webui_token.txt"));
|
|
7209
7209
|
const logFileName = `llbot-${(/* @__PURE__ */ new Date()).toLocaleString("zh-CN")}.log`.replace(/\//g, "-").replace(/:/g, "-");
|
|
7210
|
-
const version$3 = "7.8.
|
|
7210
|
+
const version$3 = "7.8.5";
|
|
7211
7211
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
7212
7212
|
function getDefaultExportFromCjs(x) {
|
|
7213
7213
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
@@ -49535,7 +49535,7 @@ class MilkyHttpHandler {
|
|
|
49535
49535
|
this.app.use(express.json({ limit: "1024mb" }));
|
|
49536
49536
|
if (this.config.accessToken) {
|
|
49537
49537
|
this.app.use(`${this.config.prefix}/api`, (req, res, next) => {
|
|
49538
|
-
if (req.headers["content-type"]
|
|
49538
|
+
if (!req.headers["content-type"]?.includes("application/json")) {
|
|
49539
49539
|
this.ctx.logger.warn(
|
|
49540
49540
|
"MilkyHttp",
|
|
49541
49541
|
`${req.ip} -> ${req.path} (Content-Type not application/json)`
|