How to control circular redirect detection in outbound remote storage requests

The HTTP specification has a note regarding circular redirection detection:

A client SHOULD detect infinite redirection loops, since such loops generate network traffic for each redirection.

By default, Nexus remote storage requests have circular redirect detection enabled. If a single circular redirect is detected, the outbound request will fail.

Nexus 2.11.2 and greater allows some configurability of the circular redirect detection for outbound remote storage requests.

How To Adjust Circular Redirect Detection Per Host

Nexus 2.11.2 and greater can be configured to allow up to a hardcoded 10 circular redirects while requesting a remote file for specific host names:

  1. Determine what host names you need to allow circular redirects for. The host names should case insensitively match the host names configured as part of the remote URL value used in a Proxy Repository.
  2. Edit ${NEXUS_INSTALL_DIR}/conf/nexus.properties. Add a property on a new line with a comma separated list of remote host names:
    nexus.remoteStorage.enableCircularRedirectsForHosts=example.com,subdomain.example.com
  3. Start or restart Nexus for the list of host names to take effect.

    Nexus will allow up to 10 circular redirects for the specified host names. After 10 redirects to the same location, Nexus will fail the outbound request.

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk