mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
chore(api): update comment about route parameters (#4719)
This commit is contained in:
parent
2a6ee33071
commit
19df355e3c
2 changed files with 8 additions and 2 deletions
5
.changeset/witty-meals-nail.md
Normal file
5
.changeset/witty-meals-nail.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@verdaccio/api': patch
|
||||
---
|
||||
|
||||
chore(api): update comment about route parameters
|
|
@ -37,10 +37,11 @@ export default function (config: Config, auth: Auth, storage: Storage): Router {
|
|||
app.param('revision', validateName);
|
||||
app.param('token', validateName);
|
||||
|
||||
// these can't be safely put into express url for some reason
|
||||
// TODO: For some reason? what reason?
|
||||
// Express route parameter names must be valid JavaScript identifiers, which means
|
||||
// they cannot start with a hyphen (-) or contain special characters like dots (.)
|
||||
app.param('_rev', match(/^-rev$/));
|
||||
app.param('org_couchdb_user', match(/^org\.couchdb\.user:/));
|
||||
|
||||
app.use(auth.apiJWTmiddleware());
|
||||
app.use(express.json({ strict: false, limit: config.max_body_size || '10mb' }));
|
||||
app.use(antiLoop(config));
|
||||
|
|
Loading…
Reference in a new issue