mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
API auth (untested)
This commit is contained in:
@@ -25,7 +25,7 @@ async function checkAuthWithoutMigration(req, res, next) {
|
||||
}
|
||||
|
||||
async function checkApiAuth(req, res, next) {
|
||||
if (!req.session.loggedIn && req.header("auth") !== "sync") {
|
||||
if (!req.session.loggedIn) {
|
||||
res.sendStatus(401);
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ async function checkApiAuth(req, res, next) {
|
||||
}
|
||||
|
||||
async function checkApiAuthWithoutMigration(req, res, next) {
|
||||
if (!req.session.loggedIn && req.header("auth") !== "sync") {
|
||||
if (!req.session.loggedIn) {
|
||||
res.sendStatus(401);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user