You've already forked nginx-proxy-manager
							
							
				mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-11-04 04:11:42 +03: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);
 | 
						|
		}
 | 
						|
	};
 | 
						|
};
 |