0
Fork 0
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:
Marc Bernard 2023-10-07 04:43:05 -04:00 committed by GitHub
parent 44cd9e0060
commit 3ca4056186
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'@verdaccio/server': patch
---
fix: Avoid 404 error when getting favicon from root

View file

@ -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();
} }
); );