Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-9469

Context path issue when NiFi is served behind proxy server

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.15.0
    • None
    • Configuration
    • CentOS 7, openjdk version "1.8.0_312"

    Description

      After upgrading to NiFi 1.15.0 we noticed that we could no longer reach nifi on the root context path. The error we were seeing follows:

      javax.ws.rs.core.UriBuilderException: The provided context path [/] was not registered as allowed [[]] 

      Our nifi.web.proxy.context.path was set to:

      nifi.web.proxy.context.path=/

       

      To troubleshoot, we added /nifi to the nifi.web.proxy.context.path property and changed our X-ProxyContextPath proxy setting to "/nifi" and found that we could load nifi.

      nifi.web.proxy.context.path=/nifi,/ 
      X-ProxyContextPath "/nifi"

      However, leaving X-ProxyContentPath set to "/" and setting nifi.web.proxy.context.path=/nifi,/ resulted in the same error, but helped us to discover that there seems to be an issue with parsing the single '/' character from the nifi.web.proxy.context.path setting. 

      javax.ws.rs.core.UriBuilderException: The provided context path [/] was not registered as allowed [[/nifi, ]] 

      After trying different escaping methods, were able to work around this issue by using the following setting:

      nifi.web.proxy.context.path=//

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            porterep Eric Porter
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: