ingress #1

Merged
TheThomaas merged 157 commits from ingress into main 2026-09-08 13:20:49 +00:00
Showing only changes of commit b3ef5814d2 - Show all commits

View file

@ -1,57 +0,0 @@
worker_processes 1;
events {
worker_connections 1024;
}
# INGRESS_PATH=$(bashio::addon.ingress_entry)
# bashio::log.info "=== ${INGRESS_PATH} ==="
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
access_log /proc/1/fd/1;
error_log /proc/1/fd/2;
server {
listen 9080;
allow 172.30.32.2;
deny all;
server_name localhost;
client_max_body_size 10M;
# Headers de base
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;
# Proxy simple vers CookCLI
location / {
proxy_pass http://127.0.0.1:9081;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_buffering off;
set $ingress_path $http_x_forwarded_prefix;
sub_filter_once off;
sub_filter_types text/css application/javascript;
sub_filter 'href="/' 'href="$ingress_path/';
sub_filter 'src="/' 'src="$ingress_path/';
sub_filter 'action="/' 'action="$ingress_path/';
# Gérer les redirections
proxy_redirect http://127.0.0.1:9081/ $scheme://$host$ingress_path/;
proxy_redirect http://127.0.0.1:9081 $scheme://$host$ingress_path;
}
}
}