페이지 트리

기본으로 구성된 Artifactory 환경은 NPM 저장소는 scoped package 다운로드를 지원하지 않는다. 이 페이지는 이러한 문제를 해소하는 방법을 정리한다.

현상

Scoped package는 @angular/cli 와 같은 이름을 갖는데, artifactory로 요청할 때 '/'가 %2F 로 변환될 경우 Artifactory가 이를 인식하지 못하여 404 Not found 회신
  • 환경: Apache 또는 Nginx로 구성된 reverse proxy 로 구성된 Artifactory

해결 방법

Apache HTTPD 설정

Artifactory용 VirtualHost 에 AllowEncodedSlashes 설정

...
AllowEncodedSlashes NoDecode
...

nocanon 설정

...
    ProxyPass        "/artifactory/" "http://10.100.1.104:8081/artifactory/" nocanon
    ProxyPassReverse "/artifactory/" "http://10.100.1.104:8081/artifactory/"
    ProxyPass        "/"             "http://10.100.1.104:8082/" nocanon
    ProxyPassReverse "/"             "http://10.100.1.104:8082/"
...

Artifactory 설정

Enable Dependency Rewrite 활성

Administration > Repositories > NPM > Virtual > Advanced


  • 레이블 없음