You've already forked nginx-proxy-manager
							
							
				mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-10-30 18:05:34 +03: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:
		| @@ -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