Incorrect anchor URL when using url_prefix
See original GitHub issueDescribe the bug If I specify the complete URL, the link URL will be wrong.
To Reproduce Steps to reproduce the behavior:
- Set URL to
url_prefix
url_prefix: http://localhost:8888
- All anchors will have
/
as prefix
Expected behavior
All anchors will starts with url_prefix
Screenshots
Docker || Kubernetes (please complete the following information):
- Docker verdaccio tag: verdaccio:4.0.0
- Docker commands:
- Docker Version:
Docker version 18.09.2, build 6247962
Configuration File (cat ~/.config/verdaccio/config.yaml)
middlewares:
## https://github.com/n4bb12/verdaccio-github-oauth-ui
github-oauth-ui:
client-id: $GITHUB_OAUTH_UI_CLIENT_ID
client-secret: $GITHUB_OAUTH_UI_CLIENT_SECRET
# path to a directory with all packages
storage: /verdaccio/storage
# path to a directory with plugins to include
plugins: /verdaccio/plugins
max_body_size: $MAX_BODY_SIZE
auth:
## https://github.com/n4bb12/verdaccio-github-oauth-ui
github-oauth-ui:
org: $GITHUB_OAUTH_UI_ORG
packages:
'@*/*': {}
'**':
access: $authenticated
publish: $authenticated
url_prefix: $PROXY_URL
logs:
- type: stdout
format: pretty
level: http
web:
enable: true
title: $WEB_TITLE
gravatar: true
scope:
sort_packages: asc
store:
## https://github.com/verdaccio/verdaccio-google-cloud
google-cloud:
projectId: $GOOGLE_CLOUD_VERDACCIO_PROJECT_ID
kind: $GOOGLE_CLOUD_VERDACCIO_KIND
bucket: $GOOGLE_CLOUD_VERDACCIO_BUCKET
keyFilename: $GOOGLE_CLOUD_VERDACCIO_KEY
All variables are provided by docker-compose using .env
Debugging output
$ NODE_DEBUG=request verdaccio
display request calls (verdaccio <–> uplinks)$ DEBUG=express:* verdaccio
enable extreme verdaccio debug mode (verdaccio api)$ npm -ddd
prints:
npm info it worked if it ends with ok
npm verb cli [
npm verb cli '/usr/local/Cellar/node/12.1.0/bin/node',
npm verb cli '/usr/local/bin/npm',
npm verb cli '-ddd'
npm verb cli ]
npm info using npm@6.9.0
npm info using node@v12.1.0
Usage: npm <command>
where <command> is one of:
access, adduser, audit, bin, bugs, c, cache, ci, cit,
clean-install, clean-install-test, completion, config,
create, ddp, dedupe, deprecate, dist-tag, docs, doctor,
edit, explore, get, help, help-search, hook, i, init,
install, install-ci-test, install-test, it, link, list, ln,
login, logout, ls, org, outdated, owner, pack, ping, prefix,
profile, prune, publish, rb, rebuild, repo, restart, root,
run, run-script, s, se, search, set, shrinkwrap, star,
stars, start, stop, t, team, test, token, tst, un,
uninstall, unpublish, unstar, up, update, v, version, view,
whoami
npm <command> -h quick help on <command>
npm -l display full usage info
npm help <term> search for help on <term>
npm help npm involved overview
Specify configs in the ini-formatted file:
/Users/monry/.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config
npm@6.9.0 /usr/local/lib/node_modules/npm
$ npm config get registry
prints:
https://registry.npmjs.org/
Additional context I’m using nginx on Docker with below settings as proxy server to add Authorization header.
server {
listen 8888;
server_name localhost;
location / {
proxy_pass "https://real-verdaccio-registry/";
proxy_set_header Authorization "Bearer ${AUTH_TOKEN}";
}
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
I am getting incorrect URL in anchor tag - Stack Overflow
The reason is that your browser does not know that you're linking to an external resource, thus thinking that you're linking to a...
Read more >Data URLs - HTTP - MDN Web Docs - Mozilla
Data URLs, URLs prefixed with the data: scheme, allow content creators to embed small files inline in documents. They were formerly known as ......
Read more >parse_url - Manual - PHP
This function parses a URL and returns an associative array containing any of the various components of the URL that are present.
Read more >Set up a custom domain for Dynamic Links - Firebase
When you configure Dynamic Links to use a particular URL prefix, all URLs that begin with that prefix are treated as Dynamic Links,...
Read more >Configuring links | React Navigation
Handling unmatched routes or 404. If your app is opened with an invalid URL, most of the times you'd want to show an...
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
I solved this issue by adding the Host header.
X-Forwarded-Proto
could not pass it due to GKE constraints, so I built proxy nginx using https protocol with a self-signed certificate to avoid this issue.🤖This thread has been automatically locked 🔒 since there has not been any recent activity after it was closed. We lock tickets after 90 days with the idea to encourage you to open a ticket with new fresh data and to provide you better feedback 🤝and better visibility 👀. If you consider, you can attach this ticket 📨 to the new one as a reference for better context. Thanks for being a part of the Verdaccio community! 💘