mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 06:33:51 +00:00 
			
		
		
		
	| @@ -2,12 +2,12 @@ server { | ||||
|     listen %%port%% default_server ssl http2; | ||||
|  | ||||
|     include /etc/nginx/includes/server_params.conf; | ||||
| 	include /etc/nginx/includes/proxy_params.conf; | ||||
| 	include /etc/nginx/includes/ssl_params.conf; | ||||
| 	# Clear Hass.io Ingress header | ||||
| 	proxy_set_header X-Hassio-Ingress ""; | ||||
|     include /etc/nginx/includes/proxy_params.conf; | ||||
|     include /etc/nginx/includes/ssl_params.conf; | ||||
|     # Clear Hass.io Ingress header | ||||
|     proxy_set_header X-Hassio-Ingress ""; | ||||
|  | ||||
| 	# Redirect http requests to https on the same port. | ||||
|     # Redirect http requests to https on the same port. | ||||
|     # https://rageagainstshell.com/2016/11/redirect-http-to-https-on-the-same-port-in-nginx/ | ||||
|     error_page 497 https://$http_host$request_uri; | ||||
|  | ||||
|   | ||||
| @@ -7,10 +7,10 @@ server { | ||||
|     proxy_set_header X-Hassio-Ingress "YES"; | ||||
|  | ||||
|     location / { | ||||
|     	# Only allow from Hass.io supervisor | ||||
|         # Only allow from Hass.io supervisor | ||||
|         allow   172.30.32.2; | ||||
|         deny    all; | ||||
|  | ||||
|         proxy_pass http://esphome; | ||||
|     } | ||||
| } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user