Hostname should be a per request thing
See original GitHub issueYour Environment
- verdaccio version: 5.7.0
- node version [12.x.x, 14.x.x]: 14.18.2
- package manager: [npm@7, pnpm@6, yarn@2] docker
- os: [mac, windows@10, linux] docker
- platform: [npm, docker, helm, other] docker
Describe the bug
Currently, verdaccio hostname is not a per request thing. Seems the hostname from first req is persist forever.
To Reproduce
$ docker-compose down
$ docker-compose up -d
$ curl http://aaa:4873/foobar | grep tarball
"tarball": "http://aaa:4873/xxx.tgz"
$ curl http://bbb:4873/foobar | grep tarball
"tarball": "http://aaa:4873/xxx.tgz"
$ docker-compose down
$ docker-compose up -d
$ curl http://bbb:4873/foobar | grep tarball
"tarball": "http://bbb:4873/xxx.tgz"
$ curl http://aaa:4873/foobar | grep tarball
"tarball": "http://bbb:4873/xxx.tgz"
Expected behavior
$ docker-compose down
$ docker-compose up -d
$ curl http://aaa:4873/foobar | grep tarball
"tarball": "http://aaa:4873/xxx.tgz"
$ curl http://bbb:4873/foobar | grep tarball
"tarball": "http://bbb:4873/xxx.tgz"
$ docker-compose down
$ docker-compose up -d
$ curl http://bbb:4873/foobar | grep tarball
"tarball": "http://bbb:4873/xxx.tgz"
$ curl http://aaa:4873/foobar | grep tarball
"tarball": "http://aaa:4873/xxx.tgz"
Screenshots, server logs, package manager log
Configuration File (cat ~/.config/verdaccio/config.yaml)
Environment information
Debugging output
$ NODE_DEBUG=request verdaccio
display request calls (verdaccio <–> uplinks)$ DEBUG=verdaccio* verdaccio
enable extreme verdaccio debug mode (verdaccio api)$ npm -ddd
prints:$ npm config get registry
prints:
Contribute to Verdaccio
- I’m willing to fix this bug 🥇
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Hostname - Wikipedia
Hostnames may be simple names consisting of a single word or phrase, or they may be structured. Each hostname usually has at least...
Read more >What is a hostname? - Opensource.com
A hostname should be between 1 and 63 ASCII characters in length; A FQDN has a maximum length of 253 ASCII characters; Case-insensitive;...
Read more >Amazon EC2 instance hostname types - AWS Documentation
This section describes the Amazon EC2 instance guest OS hostname types available when you launch instances into your VPC subnets. The hostname distinguishes ......
Read more >Need to modify Host header and Hostname, but not to same ...
request always matches the updated hostname. This is not what I want, and I'll explain why. matches the hostname under which the config...
Read more >Hostnames for Local Application Servers - Commotion Wireless
Each node has a file called “hosts”, that lists hostnames and the corresponding IP addresses. When a user connected to a node tries...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Seems 5.X has this bug, v6.0.0-6-next.30 fixed it.
First request using 127.0.0.1
Without docker, v6.0.0-6-next.30, second req: ok
With docker, 5.7.0, second req: fail
Without docker, 5.7.0, second req: fail