Setting "X-Forwarded-Proto: https" in the SSL proxy is the correct way to do this
This commit is contained in:
		
							parent
							
								
									653ec0cbb0
								
							
						
					
					
						commit
						2a0b62d26d
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -9,8 +9,8 @@ export default function(ctx: Koa.Context, user: ILocalUser, redirect = false) {
 | 
				
			||||||
		path: '/',
 | 
							path: '/',
 | 
				
			||||||
		domain: config.hostname,
 | 
							domain: config.hostname,
 | 
				
			||||||
		// SEE: https://github.com/koajs/koa/issues/974
 | 
							// SEE: https://github.com/koajs/koa/issues/974
 | 
				
			||||||
		//secure: config.url.startsWith('https'),
 | 
							// When using a SSL proxy it should be configured to add the "X-Forwarded-Proto: https" header
 | 
				
			||||||
		secure: false,
 | 
							secure: config.url.startsWith('https'),
 | 
				
			||||||
		httpOnly: false,
 | 
							httpOnly: false,
 | 
				
			||||||
		expires: new Date(Date.now() + expires),
 | 
							expires: new Date(Date.now() + expires),
 | 
				
			||||||
		maxAge: expires
 | 
							maxAge: expires
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue