mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-04-01 02:42:23 -05:00
fix: avoid access to sidebar without login (#1794)
This commit is contained in:
parent
f9e7f8671b
commit
c2e0e1e0bf
1 changed files with 1 additions and 1 deletions
|
@ -106,7 +106,7 @@ function addPackageWebApi(route: Router, storage: IStorageHandler, auth: IAuth,
|
|||
});
|
||||
});
|
||||
|
||||
route.get('/sidebar/(@:scope/)?:package', function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
|
||||
route.get('/sidebar/(@:scope/)?:package', can('access'), function(req: $RequestExtend, res: $ResponseExtend, next: $NextFunctionVer): void {
|
||||
const packageName: string = req.params.scope ? addScope(req.params.scope, req.params.package) : req.params.package;
|
||||
|
||||
storage.getPackage({
|
||||
|
|
Loading…
Add table
Reference in a new issue