# Java OIDC adapter logs out via frontend URL instead of auth-server-url

**URL:** <https://forum.keycloak.org/t/java-oidc-adapter-logs-out-via-frontend-url-instead-of-auth-server-url/10646>\
**Category:** Securing applications\
**Tags:** oidc\
**Created:** [August 23, 2021, 3:59pm UTC](https://forum.keycloak.org/t/java-oidc-adapter-logs-out-via-frontend-url-instead-of-auth-server-url/10646 "2021-08-23T15:59:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jens1](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@jens1](https://forum.keycloak.org/u/jens1)\
**Post date:** [August 23, 2021, 3:59pm UTC](https://forum.keycloak.org/t/java-oidc-adapter-logs-out-via-frontend-url-instead-of-auth-server-url/10646/1 "2021-08-23T15:59:39Z")

</div>

Hello,

I have a JavaEE application secured with Keycloak’s official OIDC adapter. Because both the application and Keycloak run as docker containers on the same server, I have set up the hostname provider with a frontend URL for end users different from the URL configured for backend-to-Keycloak requests (see [Documentation](https://www.keycloak.org/docs/12.0/server_installation/index.html#_hostname)).

This works fine, except when the user logs out via `HttpServletRequest.logout()`. With this action, the adapter (= the backend) performs a POST request to the end\_session\_endpoint in the OIDC config hosted at \<my\_keycloak\_server\>/auth/realms/\<my\_realm\>/.well-known/openid-configuration, which is the frontend URL.

Is there any way to override this?

Thanks

---

<div class="post-metadata">

**Author:** ![OLibutzki](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/olibutzki/32/1460_2.png) [@OLibutzki](https://forum.keycloak.org/u/OLibutzki)\
**Post date:** [March 25, 2022, 9:00am UTC](https://forum.keycloak.org/t/java-oidc-adapter-logs-out-via-frontend-url-instead-of-auth-server-url/10646/2 "2022-03-25T09:00:02Z")

</div>

Seems to be a duplicate of this question: [Spring: adapter-core logout uses Frontend URL from backend · Discussion #10657 · keycloak/keycloak · GitHub](https://github.com/keycloak/keycloak/discussions/10657)

I’m interested in a solution as well.
