mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-10-31 07:43:33 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			295 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			295 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| import Access from "../access.js";
 | |
| 
 | |
| export default () => {
 | |
| 	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);
 | |
| 		}
 | |
| 	};
 | |
| };
 |