forked from jan-leila/nix-config
		
	refactor: split server modules into smaller more manageable files
This commit is contained in:
		
							parent
							
								
									b2e5ae1f98
								
							
						
					
					
						commit
						cdeb4e108b
					
				
					 49 changed files with 1519 additions and 1270 deletions
				
			
		
							
								
								
									
										27
									
								
								modules/nixos-modules/server/panoramax/proxy.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								modules/nixos-modules/server/panoramax/proxy.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,27 @@ | |||
| { | ||||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: { | ||||
|   config = lib.mkIf (config.services.panoramax.enable && config.host.reverse_proxy.enable) { | ||||
|     host = { | ||||
|       reverse_proxy.subdomains.${config.services.panoramax.subdomain} = { | ||||
|         target = "http://localhost:${toString config.services.panoramax.port}"; | ||||
| 
 | ||||
|         websockets.enable = true; | ||||
|         forwardHeaders.enable = true; | ||||
| 
 | ||||
|         extraConfig = '' | ||||
|           # allow large file uploads for panoramic images | ||||
|           client_max_body_size 100M; | ||||
| 
 | ||||
|           # set timeout for image processing | ||||
|           proxy_read_timeout 300s; | ||||
|           proxy_send_timeout 300s; | ||||
|           send_timeout       300s; | ||||
|           proxy_redirect     off; | ||||
|         ''; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue