ingress #1
|
|
@ -14,10 +14,31 @@ http {
|
||||||
access_log /proc/1/fd/1;
|
access_log /proc/1/fd/1;
|
||||||
error_log /proc/1/fd/2;
|
error_log /proc/1/fd/2;
|
||||||
|
|
||||||
|
upstream cookcli_backend {
|
||||||
|
server 127.0.0.1:9081; # Le port interne de CookCLI
|
||||||
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 9080;
|
listen 9080;
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
# Proxy simple et direct vers CookCLI
|
||||||
|
proxy_pass http://cookcli_backend;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 9081;
|
||||||
|
server_name localhost;
|
||||||
|
|
||||||
client_max_body_size 10M;
|
client_max_body_size 10M;
|
||||||
|
|
||||||
# Headers de base
|
# Headers de base
|
||||||
|
|
@ -28,13 +49,12 @@ http {
|
||||||
|
|
||||||
# Proxy simple vers CookCLI
|
# Proxy simple vers CookCLI
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://127.0.0.1:9081;
|
proxy_pass http://cookcli_backend;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
|
|
||||||
|
|
||||||
sub_filter_once off;
|
sub_filter_once off;
|
||||||
sub_filter_types text/html text/css application/javascript;
|
sub_filter_types text/html text/css application/javascript;
|
||||||
sub_filter 'href="/' 'href="/api/hassio_ingress/8-13u1LdgJuV6yFRcXJAyE7ntZo2W_RHldPJ0xyiiKQ/';
|
sub_filter 'href="/' 'href="/api/hassio_ingress/8-13u1LdgJuV6yFRcXJAyE7ntZo2W_RHldPJ0xyiiKQ/';
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue