Fix proto with SSL (#1085)

* Fix proto with SSL

* Fix style
This commit is contained in:
Pascal Vizeli
2020-02-17 15:31:45 +01:00
committed by GitHub
parent 19bd4e564d
commit 3c281e977b
3 changed files with 12 additions and 2 deletions

View File

@@ -1,5 +1,9 @@
# Changelog # Changelog
## 10.1
- Fix issue with SSL
## 10.0 ## 10.0
- Add Ingress support - Add Ingress support

View File

@@ -1,6 +1,6 @@
{ {
"name": "HomeMatic CCU", "name": "HomeMatic CCU",
"version": "10.0", "version": "10.1",
"slug": "homematic", "slug": "homematic",
"description": "HomeMatic central based on OCCU", "description": "HomeMatic central based on OCCU",
"url": "https://github.com/home-assistant/hassio-addons/tree/master/homematic", "url": "https://github.com/home-assistant/hassio-addons/tree/master/homematic",

View File

@@ -21,6 +21,12 @@ http {
'' close; '' close;
} }
# https://stackoverflow.com/questions/21230918/nginx-scheme-variable-behind-load-balancer/21911864#21911864
map $http_x_forwarded_proto $real_scheme {
default $http_x_forwarded_proto;
'' $scheme;
}
# Ingress # Ingress
server { server {
listen 8099 default_server; listen 8099 default_server;
@@ -38,7 +44,7 @@ http {
location / { location / {
proxy_pass http://127.0.0.1:80; proxy_pass http://127.0.0.1:80;
proxy_redirect ~^/(.+)$ $scheme://$http_host%%INGRESS_ENTRY%%/$1; proxy_redirect ~^/(.+)$ $real_scheme://$http_host%%INGRESS_ENTRY%%/$1;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;