mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	Sessions will be required to solve admin-auth. I also refactored a few middlewares into seperate files to make the code easier to read. closes #262
		
			
				
	
	
		
			12 lines
		
	
	
		
			238 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			238 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| 'use strict';
 | |
| 
 | |
| const cookieSession = require('cookie-session');
 | |
| 
 | |
| module.exports = function(config) {
 | |
|     return cookieSession({
 | |
|         name: 'unleash-session',
 | |
|         keys: [config.secret],
 | |
|         maxAge: config.sessionAge,
 | |
|     });
 | |
| };
 |