fix bug when not logged in
This commit is contained in:
parent
ce2a1fb19e
commit
1a142c581b
@ -10,7 +10,11 @@ export const setup = function (router, con, server) {
|
|||||||
res.set("Access-Control-Allow-Origin", "*"); //we'll allow it for now
|
res.set("Access-Control-Allow-Origin", "*"); //we'll allow it for now
|
||||||
let unsigned;
|
let unsigned;
|
||||||
if (req.body.user == undefined || req.body.pass == undefined) {
|
if (req.body.user == undefined || req.body.pass == undefined) {
|
||||||
unsigned = unsign.getunsigned(req, res);
|
if(!req.cookies.AUTH_COOKIE) {
|
||||||
|
next()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
unsigned = unsign.unsign(req.cookies.AUTH_COOKIE, req, res);
|
||||||
if (!unsigned){
|
if (!unsigned){
|
||||||
next()
|
next()
|
||||||
return
|
return
|
||||||
|
@ -927,7 +927,12 @@ router.get("/*", async function(request, response) {
|
|||||||
} catch(ignored){
|
} catch(ignored){
|
||||||
console.log(2,"error minifying",originalUrl);
|
console.log(2,"error minifying",originalUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
response.send(str)
|
response.send(str)
|
||||||
|
} catch(err) {
|
||||||
|
console.error(err)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user