Nginx KeyClope重定向到KeyClope URI,而不是提供的重定向URI

Nginx KeyClope重定向到KeyClope URI,而不是提供的重定向URI,nginx,keycloak,Nginx,Keycloak,我们正在尝试使用KeyClope对应用程序进行身份验证。这两个应用程序都托管在nginx后面,nginx的配置似乎很好(如下所示) 我们遇到的问题是,我们指定的重定向url类似于,但keydape在 我们试图调试此问题,但无法找出可能的问题。任何指点都将不胜感激 nginx配置 server{ listen 443; server_name auth.website.com; ... certificates location / { proxy

我们正在尝试使用KeyClope对应用程序进行身份验证。这两个应用程序都托管在nginx后面,nginx的配置似乎很好(如下所示)

我们遇到的问题是,我们指定的重定向url类似于,但keydape在

我们试图调试此问题,但无法找出可能的问题。任何指点都将不胜感激

nginx配置

server{
    listen 443;
    server_name auth.website.com;
    ... certificates

    location / {
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Server $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-Host   $host;
        proxy_set_header X-Forwarded-Proto $scheme;

        proxy_pass              http://localhost:8080;
    }

}

通过将nginx配置更改为以下内容,解决了此问题

server{
    listen 443;
    server_name auth.website.com;
    ... certificates

    location / {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Forwarded-Port 443;

        proxy_buffer_size 64k;
        proxy_buffers 8 64k;
        proxy_busy_buffers_size 64k;

        proxy_pass http://127.0.0.1:9090;
    }
}

为什么要重定向到auth
redirect\u uri
应该是登录过程完成后要重定向的uri。此外,您还错过了许多信息,正在使用的适配器,您的应用程序配置。。。是我们提供的重定向uri。我们尝试使用nodejs适配器、spring引导适配器以及手动方式。问题是redirect_uri并没有重定向到website.com,而是到auth.website.com,我将在一段时间内为问题添加一个配置。