TODO: added .well-known static serving for letsencrypt, fixed some bugs from testing

pull/4/head
Florian Brede 2021-05-19 06:13:26 +02:00
parent 4d3c6605ad
commit f2691b7cdb
1 changed files with 2 additions and 2 deletions

View File

@ -52,7 +52,7 @@ function validateJWTToken(token, publicKey) {
var decoded = jwt.verify(token.replace("JWT ", ""), publicKey, { algorithms: ['RS256'] });
return decoded;
} catch (exception) {
console.log(exception);
logger.error(exception);
}
return null;
}
@ -174,7 +174,6 @@ async function getAuthenticatedAccount(req) {
return null;
}
sessionCookie={account: 'florianbrede@googlemail.com'};
const account = await db.get('SELECT * FROM accounts WHERE LOWER(email) = ?', sessionCookie.account.trim().toLowerCase());
if (!account || account.banned) {
res.clearCookie('session');
@ -208,6 +207,7 @@ app.use(cookieParser(config.applicationSalt))
app.use('/favicon.ico', express.static('static/favicon.ico'));
app.use(config.baseDriveDownloadPathMapping, express.static(config.storagePath));
app.use('/.well-known', express.static('.well-known'));
// DRIVE & BOOT/CRASH LOG FILE UPLOAD HANDLING
app.put('/backend/post_upload', bodyParser.raw({ inflate: true, limit: '100000kb', type: '*/*' }), runAsyncWrapper(async (req, res) => {