Verdaccio: Broken links when using reverse proxy with prefix

Created on 13 Jun 2018  路  4Comments  路  Source: verdaccio/verdaccio

Describe the bug
When connecting to verdaccio through a reverse proxy with a prefix, links break.

To Reproduce
Steps to reproduce the behavior:

  1. Clone the examples repo: https://github.com/verdaccio/docker-examples
  2. Modify the nginx config to include a prefix in the location, as specified in the documentation (look for "sub-directory installation"):
  location ~ ^/node/(.*)$ {
    resolver 127.0.0.11;
    proxy_pass http://verdaccio:4873/$1;
    proxy_set_header Host $host:$server_port;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    proxy_redirect off;
  }
  1. Run docker-compose up
  2. Open browser
  3. Get blank page

Expected behavior
The landing page should load, just like it does when using verdaccio 2.x.

Docker || Kubernetes (please complete the following information):

Configuration File (cat ~/.config/verdaccio/config.yaml)

url_prefix: /node/

Additional context
This same scenario works perfectly when using verdaccio 2.x.

bug outdated proxy

All 4 comments

I ran into this problem while updating our verdaccio server that is running behind a reverse proxy.
Not sure if the webpack config is the correct location to fix the problem but it worked for me.
see pull request https://github.com/verdaccio/verdaccio/pull/755 for details.

kind regards,

It will be released asap.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings