mirror of
https://github.com/Alvin-Zilverstand/nginx-proxy-manager.git
synced 2026-11-27 00:23:06 +01:00
Introducing the Setup Wizard for creating the first user
- no longer setup a default - still able to do that with env vars however
This commit is contained in:
29 files changed
+822
-615
No files matched your search
@@ -1,15 +1,15 @@
|
||||
import Access from "../access.js";
|
||||
|
||||
export default () => {
|
||||
return (_, res, next) => {
|
||||
res.locals.access = null;
|
||||
const access = new Access(res.locals.token || null);
|
||||
access
|
||||
.load()
|
||||
.then(() => {
|
||||
res.locals.access = access;
|
||||
next();
|
||||
})
|
||||
.catch(next);
|
||||
return async (_, res, next) => {
|
||||
try {
|
||||
res.locals.access = null;
|
||||
const access = new Access(res.locals.token || null);
|
||||
await access.load();
|
||||
res.locals.access = access;
|
||||
next();
|
||||
} catch (err) {
|
||||
next(err);
|
||||
}
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user