Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

133
Visualizações
Configure local proxy for the npm audit with Apache

Based on this one https://github.com/chovyy/npm-audit-proxy

In this case Nexus OSS v3 manager running behind Apache reverse proxy. There is need to proxy npm audit as well from https://registry.npmjs.org/-/npm/v1/security/audits/.

So how to configure properly Apache to pass npm adit call to https://registry.npmjs.org/-/npm/v1/security/audits/

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

This Apache configuration worked in my case.

<VirtualHost 0.0.0.0:443>
  ServerName nexus.corporate.domain

  SSLEngine on
  SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
  SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1 -TLSv1.2
  SSLHonorCipherOrder On
  SSLCompression off
  SSLCertificateFile /etc/ssl/localcerts/nexus/nexus.pem
  SSLCertificateKeyFile /etc/ssl/localcerts/nexus/nexus.key
  SSLCertificateChainFile /etc/ssl/localcerts/nexus/Local_Corporate_CA_chain.crt

  SSLSessionTickets   off
  SSLProxyEngine On

  ProxyPass /repository/npm-public/-/npm/v1/security/audits https://registry.npmjs.org/-/npm/v1/security/audits
  ProxyPassReverse /repository/npm-public/-/npm/v1/security/audits https://registry.npmjs.org/-/npm/v1/security/audits
  ProxyPass         /  http://127.0.0.1:8081/ nocanon
  ProxyPassReverse  /  http://127.0.0.1:8081/
  ProxyRequests     Off
  ProxyPreserveHost Off
  AllowEncodedSlashes on

  RequestHeader set X-Forwarded-Proto "https"
  RequestHeader set X-Forwarded-Port "443"

  <Proxy http://127.0.0.1:8081/*>
    Order allow,deny
    Allow from all
  </Proxy>

  ErrorLog /var/log/apache2/nexus_apache_error.log
  CustomLog /var/log/apache2/nexus_apache_access.log common

</VirtualHost>

I had error Forbidde 403 but it was caused by ProxyPreserveHost on. Changed it to ProxyPreserveHost off

/repository/npm-public/ is npm group type repository created in nexus. https://nexus.corporate.domain/repository/npm-public/

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda