Keycloak seems to have decided today that it will now send headers that are larger than what the nginx default configuration can handle. The numbers are a mix of made up and taken from random nginx voodoo posts on the internet, so they're as good a guess as anyone's. Change-Id: If037bcba48eee371cc96304b150276c669930c75 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7992 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de> Autosubmit: tazjin <tazjin@tvl.su>
		
			
				
	
	
		
			28 lines
		
	
	
	
		
			634 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
	
		
			634 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
| { config, ... }:
 | |
| 
 | |
| {
 | |
|   imports = [
 | |
|     ./base.nix
 | |
|   ];
 | |
| 
 | |
|   config = {
 | |
|     services.nginx.virtualHosts."auth.tvl.fyi" = {
 | |
|       serverName = "auth.tvl.fyi";
 | |
|       enableACME = true;
 | |
|       forceSSL = true;
 | |
| 
 | |
|       extraConfig = ''
 | |
|         # increase buffer size for large headers
 | |
|         proxy_buffers 8 16k;
 | |
|         proxy_buffer_size 16k;
 | |
| 
 | |
|         location / {
 | |
|           proxy_pass http://localhost:${toString config.services.keycloak.settings.http-port};
 | |
|           proxy_set_header X-Forwarded-For $remote_addr;
 | |
|           proxy_set_header X-Forwarded-Proto https;
 | |
|           proxy_set_header Host $host;
 | |
|         }
 | |
|       '';
 | |
|     };
 | |
|   };
 | |
| }
 |