code: private void updateAgentDetailsIfNeeded(HttpServletRequest pReq) {
          // Lookup the Agent URL if needed
          AgentDetails details = backendManager.getAgentDetails();
          if (details.isInitRequired()) {
              synchronized (details) {
                  if (details.isInitRequired()) {
                      if (details.isUrlMissing()) {
                          String url = getBaseUrl(NetworkUtil.sanitizeLocalUrl(pReq.getRequestURL().toString()),
                                  extractServletPath(pReq));
                          details.setUrl(url);
                      }
                      if (details.isSecuredMissing()) {
                          details.setSecured(pReq.getAuthType() != null);
                      }
                      details.seal();
                  }
              }
          }
      }
docs: Update the agent URL in the agent details if not already done