mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
fix: Avoid 404 error when getting favicon on root (#4057)
* fix: Avoid 404 when getting favicon on root * Add changeset
This commit is contained in:
parent
44cd9e0060
commit
3ca4056186
2 changed files with 6 additions and 1 deletions
5
.changeset/weak-fans-explain.md
Normal file
5
.changeset/weak-fans-explain.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'@verdaccio/server': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: Avoid 404 error when getting favicon from root
|
|
@ -48,7 +48,7 @@ const defineAPI = async function (config: IConfig, storage: Storage): Promise<an
|
||||||
app.get(
|
app.get(
|
||||||
'/favicon.ico',
|
'/favicon.ico',
|
||||||
function (req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
|
function (req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
|
||||||
req.url = '/-/static/favicon.png';
|
req.url = '/-/static/favicon.ico';
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue