mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	Refactor NGINX configuration of Home Assistant Add-on (#4312)
This commit is contained in:
		
							
								
								
									
										16
									
								
								docker/ha-addon-rootfs/etc/nginx/templates/ingress.gtpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								docker/ha-addon-rootfs/etc/nginx/templates/ingress.gtpl
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| server { | ||||
|     listen {{ .interface }}:{{ .port }} default_server; | ||||
|  | ||||
|     include /etc/nginx/includes/server_params.conf; | ||||
|     include /etc/nginx/includes/proxy_params.conf; | ||||
|  | ||||
|     # Set Home Assistant Ingress header | ||||
|     proxy_set_header X-HA-Ingress "YES"; | ||||
|  | ||||
|     location / { | ||||
|         allow   172.30.32.2; | ||||
|         deny    all; | ||||
|  | ||||
|         proxy_pass http://esphome; | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user