https - Keycloak 登录和注册操作不是 https
问题描述
我有 nginx 可以处理 https,但是 keycloak 的登录和注册表单有 http 操作,我找不到将它们设置为 https 的方法。
在浏览器中将它们设置为 https 可以正常工作。
有两个变量:
{url.registrationUrl}
{url.loginAction}
这些价值观从何而来?
编辑:
我做了一个解决方法
{url.registrationUrl?replace('http', 'https')}
解决方案
使用代理地址转发。
- 转发 Nginx (server.conf) 中的原始模式 proxy_set_header X-Forwarded-Proto $scheme;
- 在 http-listener 中的 Keyclok (standalone/domain.xml) proxy-address-forwarding=true 中使用此信息
https://www.keycloak.org/docs/latest/server_installation/index.html#identifying-client-ip-addresses
推荐阅读
- php - 更新所有类依赖项中的控制器路径
- php - 如何在 docker 设置上使用令牌从 laravel 访问 API 路由?
- python - 使用包含重复列标题的 pandas 更新数据框
- excel - 使用 Resume Next 在循环中处理错误
- c# - 尝试在 VS C# 中保存图像退出,代码为 -2147483645 (0x80000003)
- php - 如何最好地从另一个 Php 文件访问 Php 静态变量
- python - 在 for 循环中更新字典的问题(不是唯一的)
- r - 使用类似 purrr 的函数循环遍历列表的元素
- elasticsearch - Elasticsearch 仅匹配标签数组中给定的标签
- css - 为什么“z-index”被忽略了?元素只是部分向前