问题描述
pod -> service -> Nginx -> ingress
例如,当我们打开一个URL-“ https://acme-node1.example.com”时,Nginx会将“ acme”标识为pod名称,而“ -node1”则属于端口“ 8080”,最终执行代理通过反向,但是,我们遇到了一个问题
Mixed Content: The page at 'https://acme-node1.example.com/navpage.do' was loaded over HTTPS,but requested an insecure form action 'http://acme-node1.example.com/login_redirect.do?sysparm_stack=no'. This request has been blocked; the content must be served over HTTPS.
下面是Nginx conf文件的详细信息(存储在conf.d下),请确认是否有任何要纠正的内容以解决“混合内容...”
virtualhost-node1.conf: |
server {
listen 80;
server_name ~^(?P<servicename1>.+)\-node1\..+\.example\.com$;
set $backend1 "http://$servicename1:8080";
client_max_body_size 1024M;
client_body_buffer_size 16k;
proxy_connect_timeout 9000;
proxy_send_timeout 9000;
proxy_read_timeout 9000;
send_timeout 9000;
client_header_timeout 9000;
client_body_timeout 9000;
fastcgi_read_timeout 9000;
fastcgi_buffers 8 512k;
fastcgi_buffer_size 512k;
location / {
proxy_set_header X-Forwarded-Proto $scheme;
resolver 127.0.0.1:53 ipv6=off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_pass $backend1;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
client_max_body_size 1024M;
client_body_buffer_size 16k;
proxy_connect_timeout 9000;
proxy_send_timeout 9000;
proxy_read_timeout 9000;
send_timeout 9000;
fastcgi_read_timeout 9000;
fastcgi_buffers 8 512k;
fastcgi_buffer_size 512k;
}
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)