portainer_proxy_nginx.conf
· 1.3 KiB · Text
Неформатований
# === Portainer via Nginx Proxy Manager ===
location / {
# === Backend Portainer ===
proxy_pass http://192.168.1.150:9010/;
# Headers classiques
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;
# Supprimer protections anti-iframe de Portainer
proxy_hide_header X-Frame-Options;
proxy_hide_header Content-Security-Policy;
add_header X-Frame-Options "ALLOWALL";
add_header Content-Security-Policy "frame-ancestors *" always;
# Support du sous-chemin / proxy
proxy_set_header X-Portainer-Base-Url /;
# WebSocket Portainer
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400;
proxy_send_timeout 86400;
proxy_buffering off;
# Subfilter pour thème custom
proxy_set_header Accept-Encoding "";
sub_filter_once on;
sub_filter '</head>' '<link rel="stylesheet" type="text/css" href="https://theme.myoueb.fr/css/base/portainer/space-gray.css"></head>';
# Tracker JS Umami
sub_filter '</body>' '<script async defer data-website-id="3fa604ed-8986-4424-85a7-729b9ef87007" src="https://way.myoueb.fr/script.js"></script></body>';
}
| 1 | # === Portainer via Nginx Proxy Manager === |
| 2 | |
| 3 | location / { |
| 4 | # === Backend Portainer === |
| 5 | proxy_pass http://192.168.1.150:9010/; |
| 6 | |
| 7 | # Headers classiques |
| 8 | proxy_set_header Host $host; |
| 9 | proxy_set_header X-Real-IP $remote_addr; |
| 10 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 11 | proxy_set_header X-Forwarded-Proto $scheme; |
| 12 | |
| 13 | # Supprimer protections anti-iframe de Portainer |
| 14 | proxy_hide_header X-Frame-Options; |
| 15 | proxy_hide_header Content-Security-Policy; |
| 16 | add_header X-Frame-Options "ALLOWALL"; |
| 17 | add_header Content-Security-Policy "frame-ancestors *" always; |
| 18 | |
| 19 | # Support du sous-chemin / proxy |
| 20 | proxy_set_header X-Portainer-Base-Url /; |
| 21 | |
| 22 | # WebSocket Portainer |
| 23 | proxy_http_version 1.1; |
| 24 | proxy_set_header Upgrade $http_upgrade; |
| 25 | proxy_set_header Connection "upgrade"; |
| 26 | proxy_read_timeout 86400; |
| 27 | proxy_send_timeout 86400; |
| 28 | proxy_buffering off; |
| 29 | |
| 30 | # Subfilter pour thème custom |
| 31 | proxy_set_header Accept-Encoding ""; |
| 32 | sub_filter_once on; |
| 33 | sub_filter '</head>' '<link rel="stylesheet" type="text/css" href="https://theme.myoueb.fr/css/base/portainer/space-gray.css"></head>'; |
| 34 | |
| 35 | # Tracker JS Umami |
| 36 | sub_filter '</body>' '<script async defer data-website-id="3fa604ed-8986-4424-85a7-729b9ef87007" src="https://way.myoueb.fr/script.js"></script></body>'; |
| 37 | } |