Class ClientInfoServiceImpl

    • Constructor Detail

      • ClientInfoServiceImpl

        @Autowired(required=true)
        public ClientInfoServiceImpl​(ConfigurationService configurationService)
    • Method Detail

      • getClientIp

        public String getClientIp​(javax.servlet.http.HttpServletRequest request)
        Description copied from interface: ClientInfoService
        Get the client IP of this request taking into account the X-Forwarded-For header and the "useProxies" setting
        Specified by:
        getClientIp in interface ClientInfoService
        Parameters:
        request - The client HTTP request
        Returns:
        The IP address of the originating client
      • getClientIp

        public String getClientIp​(String remoteIp,
                                  String xForwardedForHeaderValue)
        Description copied from interface: ClientInfoService
        Get the client IP of this request taking into account the X-Forwarded-For header and the "useProxies" setting
        Specified by:
        getClientIp in interface ClientInfoService
        Parameters:
        remoteIp - the remote address of the current request
        xForwardedForHeaderValue - The value of the X-Forwarded-For header
        Returns:
        The IP address of the originating client
      • isUseProxiesEnabled

        public boolean isUseProxiesEnabled()
        Description copied from interface: ClientInfoService
        Does DSpace take into account HTTP proxy headers or not
        Specified by:
        isUseProxiesEnabled in interface ClientInfoService
        Returns:
        true if this is the case, false otherwise