|
|
@ -97,7 +97,7 @@ log.debug("server", "Importing Background Jobs");
|
|
|
|
const { initBackgroundJobs, stopBackgroundJobs } = require("./jobs");
|
|
|
|
const { initBackgroundJobs, stopBackgroundJobs } = require("./jobs");
|
|
|
|
const { loginRateLimiter, twoFaRateLimiter } = require("./rate-limiter");
|
|
|
|
const { loginRateLimiter, twoFaRateLimiter } = require("./rate-limiter");
|
|
|
|
|
|
|
|
|
|
|
|
const { apiAuth } = require("./auth");
|
|
|
|
const { basicAuthMiddleware } = require("./auth");
|
|
|
|
const { login } = require("./auth");
|
|
|
|
const { login } = require("./auth");
|
|
|
|
const passwordHash = require("./password-hash");
|
|
|
|
const passwordHash = require("./password-hash");
|
|
|
|
|
|
|
|
|
|
|
@ -267,8 +267,8 @@ let needSetup = false;
|
|
|
|
// Basic Auth Router here
|
|
|
|
// Basic Auth Router here
|
|
|
|
|
|
|
|
|
|
|
|
// Prometheus API metrics /metrics
|
|
|
|
// Prometheus API metrics /metrics
|
|
|
|
// With Basic Auth using the first user's username/password
|
|
|
|
// With Basic Auth using an API Key
|
|
|
|
app.get("/metrics", apiAuth, prometheusAPIMetrics());
|
|
|
|
app.get("/metrics", basicAuthMiddleware, prometheusAPIMetrics());
|
|
|
|
|
|
|
|
|
|
|
|
app.use("/", expressStaticGzip("dist", {
|
|
|
|
app.use("/", expressStaticGzip("dist", {
|
|
|
|
enableBrotli: true,
|
|
|
|
enableBrotli: true,
|
|
|
|