hopefully deepsource is pleased this time

This commit is contained in:
Mystikfluu
2023-02-06 11:03:50 +01:00
parent 00e1b5c1e5
commit 3942a6e2df
4 changed files with 132 additions and 103 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ const HASHES_COOKIE = config.cookies.client_hashes;
const HASHES_DIFF = HASHES_DB - HASHES_COOKIE;
export const setup = function (router, con, server) {
router.use("/*", async function (req, res, next) {
router.use("/*", (req, res, next) => {
res.set("Access-Control-Allow-Origin", "*"); //we'll allow it for now
let unsigned;
if (req.body.user == undefined || req.body.pass == undefined) {
@@ -103,7 +103,7 @@ export const setup = function (router, con, server) {
});
});
router.use("/api/*", function (req, res, next) {
router.use("/api/*", (req, res, next) => {
res.set("Access-Control-Allow-Origin", "*"); //we'll allow it for now
if (config["allow_getotheruser_without_cookie"] && req.originalUrl.split("\?")[0] == "/api/getotheruser") {
next();