mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +01:00
fix: 🔥 Remove Prometheus integration as it is causing issues
This commit is contained in:
parent
ed22da15df
commit
76237a9e1e
17
app.ts
17
app.ts
|
|
@ -1,11 +1,10 @@
|
||||||
import { response } from "@/response";
|
|
||||||
import { sentry } from "@/sentry";
|
import { sentry } from "@/sentry";
|
||||||
import { Hono } from "@hono/hono";
|
import { Hono } from "@hono/hono";
|
||||||
import { cors } from "@hono/hono/cors";
|
import { cors } from "@hono/hono/cors";
|
||||||
import { prettyJSON } from "@hono/hono/pretty-json";
|
import { prettyJSON } from "@hono/hono/pretty-json";
|
||||||
import { secureHeaders } from "@hono/hono/secure-headers";
|
import { secureHeaders } from "@hono/hono/secure-headers";
|
||||||
import { prometheus } from "@hono/prometheus";
|
/* import { prometheus } from "@hono/prometheus";
|
||||||
import { getLogger } from "@logtape/logtape";
|
*/ import { getLogger } from "@logtape/logtape";
|
||||||
import { config } from "~/packages/config-manager/index";
|
import { config } from "~/packages/config-manager/index";
|
||||||
import { agentBans } from "./middlewares/agent-bans";
|
import { agentBans } from "./middlewares/agent-bans";
|
||||||
import { bait } from "./middlewares/bait";
|
import { bait } from "./middlewares/bait";
|
||||||
|
|
@ -23,7 +22,7 @@ export const appFactory = async () => {
|
||||||
strict: false,
|
strict: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
const { printMetrics, registerMetrics } = prometheus({
|
/* const { printMetrics, registerMetrics } = prometheus({
|
||||||
collectDefaultMetrics: true,
|
collectDefaultMetrics: true,
|
||||||
metricOptions: {
|
metricOptions: {
|
||||||
requestsTotal: {
|
requestsTotal: {
|
||||||
|
|
@ -33,7 +32,7 @@ export const appFactory = async () => {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
}); */
|
||||||
|
|
||||||
app.use(ipBans);
|
app.use(ipBans);
|
||||||
app.use(agentBans);
|
app.use(agentBans);
|
||||||
|
|
@ -82,8 +81,8 @@ export const appFactory = async () => {
|
||||||
credentials: true,
|
credentials: true,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
app.use("*", registerMetrics);
|
/* app.use("*", registerMetrics);
|
||||||
app.get("/metrics", printMetrics);
|
app.get("/metrics", printMetrics); */
|
||||||
// Disabled as federation now checks for this
|
// Disabled as federation now checks for this
|
||||||
// app.use(urlCheck);
|
// app.use(urlCheck);
|
||||||
|
|
||||||
|
|
@ -99,8 +98,8 @@ export const appFactory = async () => {
|
||||||
route.default(app);
|
route.default(app);
|
||||||
}
|
}
|
||||||
|
|
||||||
app.options("*", () => {
|
app.options("*", (context) => {
|
||||||
return response(null);
|
return context.text("", 204);
|
||||||
});
|
});
|
||||||
|
|
||||||
app.all("*", async (context) => {
|
app.all("*", async (context) => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue