Implements origin/referrer block (khanon/oai-reverse-proxy!13)

This commit is contained in:
nai-degen
2023-05-22 21:08:20 +00:00
parent a3620db591
commit a61fa04fbf
4 changed files with 70 additions and 0 deletions
+2
View File
@@ -12,6 +12,7 @@ import { handleInfoPage } from "./info-page";
import { logQueue } from "./prompt-logging";
import { start as startRequestQueue } from "./proxy/queue";
import { init as initUserStore } from "./proxy/auth/user-store";
import { checkOrigin } from "./proxy/check-origin";
const PORT = config.port;
@@ -61,6 +62,7 @@ app.use(
app.set("trust proxy", true);
// routes
app.use(checkOrigin);
app.get("/", handleInfoPage);
app.use("/admin", adminRouter);
app.use("/proxy", proxyRouter);