Oidc logout with post_logout_redirect_uri redirects to KeyCloak url

Hi,
I’m new to KeyCloak so probably I’m configuring something wrong, but I can’t figure it out. Any help appreciated.

I’m setting up an ASP.NET Core application using KeyCloak OpenIDConnect for authentication. Logging in works fine, but when I log out I’m redirected to the wrong URL. I can see that when logging out this URL is called (I removed the other URL parameters, and had to replace the URLs):
GET https://{my-kc-url}/auth/realms/DeRuwenberg/protocol/openid-connect/logout?post_logout_redirect_uri=https%3A%2F%2F{my-app-url}%2Fsignout-callback-oidc

I would expect to be redirected to https://{my-app-url}/signout-callback-oidc , but instead I’m being redirected to https://{my-kc-url}/signout-callback-oidc
So it looks like it’s replacing the application base URL with the KeyCloak base URL. If I change signout-callback-oidc to e.g. test-callback-oidc I’m being redirected to https://{my-kc-url}/test-callback-oidc

What can be causing this?
Thanks for any help

Frank

Solved it myself. It had to do with using IIS as reverse proxy. IIS was rewriting the 302 redirect. See: url rewriting - IIS reverse proxy with rewrites can't handle a redirect from the server we proxy to - Stack Overflow