SSO might cause infinite loop

In a project, a requesthandler is used for SSO implementation. When starting the App, the network sends the user to the url of this requesthandler with the username in the http header. The requesthandler gets the username from the http header and creates the session. After creating the session, the user is redirected to the root, by using response.setStatus(HttpServletResponse.SCSEEOTHER); and response.addHeader("location", ".."); This creates another request and the network (might) translate this request and sends this again to the requesthandler Potentially an infinite loop migth be triggered here. How I make sure this is not happening?
1 answers

In the appstore module the redirection is done to a specific page like index3.html