mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
chore: encode parts of URL (#4922)
This commit is contained in:
parent
fa22fa340d
commit
e3c55f008c
2 changed files with 7 additions and 2 deletions
5
.changeset/rude-birds-design.md
Normal file
5
.changeset/rude-birds-design.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'verdaccio': patch
|
||||
---
|
||||
|
||||
chore: encode parts of URL
|
|
@ -216,7 +216,7 @@ export class ServerQuery {
|
|||
*/
|
||||
public removePackage(name: string, rev) {
|
||||
return this.request({
|
||||
uri: `/${encodeURIComponent(name)}/-rev/${rev}`,
|
||||
uri: `/${encodeURIComponent(name)}/-rev/${encodeURIComponent(rev)}`,
|
||||
method: 'DELETE',
|
||||
headers: {
|
||||
[HEADERS.CONTENT_TYPE]: HEADERS.JSON_CHARSET,
|
||||
|
@ -226,7 +226,7 @@ export class ServerQuery {
|
|||
|
||||
public removeSingleTarball(name: string, filename: string) {
|
||||
return this.request({
|
||||
uri: `/${encodeURIComponent(name)}/-/${filename}/-rev/whatever`,
|
||||
uri: `/${encodeURIComponent(name)}/-/${encodeURIComponent(filename)}/-rev/whatever`,
|
||||
method: 'DELETE',
|
||||
headers: {
|
||||
[HEADERS.CONTENT_TYPE]: HEADERS.JSON_CHARSET,
|
||||
|
|
Loading…
Reference in a new issue