在Keycloak上配置反向代理时,出现以下错误。
Mixed Content: The page at 'https://keycloak.com/auth/admin/master/console/' was loaded over HTTPS, but requested an insecure script 'http://keycloak.com/auth/js/keycloak.js?version=vr8o5'. This request has been blocked; the content must be served over HTTPS.
如何解决此问题以及需要在nginx中添加什么配置。
答案 0 :(得分:0)
您必须使用必需的标头更改默认的NGINX服务器配置:
location / {
try_files $uri /index.html;
proxy_set_header X-Forwarded-Proto $scheme;
**add_header Access-Control-Allow-Origin *;**
}