mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-02-17 23:45:29 -05:00
docs: improve url_prefix docs and public domain override
This commit is contained in:
parent
b6495d5b6c
commit
988ff72081
2 changed files with 32 additions and 1 deletions
|
@ -155,7 +155,7 @@ The prefix is intended to be used when the server runs behinds the proxy, check
|
|||
url_prefix: /verdaccio/
|
||||
```
|
||||
|
||||
> Verdaccio 5 has an improved prefix behaviour, [check here details](https://verdaccio.org/blog/2021/04/14/verdaccio-5-migration-guide#url_prefix-improved-behavior).
|
||||
> Verdaccio 5 has an improved prefix behaviour and the `VERDACCIO_PUBLIC_URL` is avilable for use, learn how to [here](https://verdaccio.org/blog/2021/04/14/verdaccio-5-migration-guide#url_prefix-improved-behavior).
|
||||
|
||||
### Max Body Size {#max-body-size}
|
||||
|
||||
|
|
|
@ -194,3 +194,34 @@ location ~ ^/verdaccio/(.*)$ {
|
|||
For this case, `url_prefix` should set to `/verdaccio/`
|
||||
|
||||
> Note: There is a slash after the install path (`https://your-domain:port/verdaccio/`)!
|
||||
|
||||
### Overriding the public url
|
||||
|
||||
> Since `verdaccio@5.0.0`
|
||||
|
||||
|
||||
The new `VERDACCIO_PUBLIC_URL` is intended to be used behind proxies, this variable will be used for:
|
||||
|
||||
- Used as base path to serve UI resources as (js, favicon, etc)
|
||||
- Used on return metadata `dist` base path
|
||||
- Ignores `host` and `X-Forwarded-Proto` headers
|
||||
- If `url_prefix` is defined would be appened to the env variable.
|
||||
|
||||
```
|
||||
VERDACCIO_PUBLIC_URL='https://somedomain.org';
|
||||
url_prefix: '/my_prefix'
|
||||
|
||||
// url -> https://somedomain.org/my_prefix/
|
||||
|
||||
VERDACCIO_PUBLIC_URL='https://somedomain.org';
|
||||
url_prefix: '/'
|
||||
|
||||
// url -> https://somedomain.org/
|
||||
|
||||
VERDACCIO_PUBLIC_URL='https://somedomain.org/first_prefix';
|
||||
url_prefix: '/second_prefix'
|
||||
|
||||
// url -> https://somedomain.org/second_prefix/'
|
||||
```
|
||||
|
||||

|
||||
|
|
Loading…
Add table
Reference in a new issue