Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-14254

Reverse Proxy config generated for Apache does not work with NPM scope packages

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: 5.1.4, 7.3.2
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      apache 2.4
      artifactory 5.1.4
      CentOS 7

    • Regression:
      Yes

      Description

      The actual snippet generated by artifactory has two directive that brokes any npm request to scoped packages.

      The first wrong directive introduced as regression in RTFACT-11880 is:

      AllowEncodedSlashes On

      The correct value (as declared in your guide here) is

      AllowEncodedSlashes NoDecode

      this permit to understand correctly the request https://artifactory.acme.com/artifactory/npm-virtual....../myscope%2fmypackage, where requested package is @myscope/mypackage. If encode is enabled on the proxy the url will be https://artifactory.acme.com/artifactory/....myscope/mypackage and the search fails because it say that myscope is not a valid npm repository :\

      The second missing options (days of debug to understand what was the problem) is nocanon at the end of ProxyPass directive.

      ProxyPass /artifactory/ http://locahost:8081/artifactory/ nocanon

      Without this directive apache (tested on 2.4) mod_proxy attempts to re-encode (double encode) the URL changing %2F (the slash) to %252F (encoding percent to %25) and this cause the @myscope%252Fmypackage not found

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              nfalco79 Nikolas Falco
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: