src/main/java/org/keycloak/protocol/cas/endpoints/ServiceValidateEndpoint.java
@@ -51,7 +51,7 @@ } private Response prepare(Response.Status status, CASServiceResponse serviceResponse) { MediaType responseMediaType = new ContentTypeHelper(request, restRequest, uriInfo).selectResponseType(); MediaType responseMediaType = new ContentTypeHelper(request, restRequest, session.getContext().getUri()).selectResponseType(); return ServiceResponseHelper.createResponse(status, responseMediaType, serviceResponse); } }