mirror of
https://github.com/esphome/esphome.git
synced 2024-12-11 14:49:20 +01:00
23 lines
642 B
Plaintext
23 lines
642 B
Plaintext
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;
|
|
|
|
ssl on;
|
|
ssl_certificate /ssl/%%certfile%%;
|
|
ssl_certificate_key /ssl/%%keyfile%%;
|
|
|
|
# Clear Hass.io Ingress header
|
|
proxy_set_header X-Hassio-Ingress "";
|
|
|
|
# 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;
|
|
|
|
location / {
|
|
proxy_pass http://esphome;
|
|
}
|
|
}
|