@verdaccio/url 11.0.0-6-next.16 → 11.0.0-6-next.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/package.json +2 -2
- package/tests/getPublicUrl.spec.ts +21 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 11.0.0-6-next.17
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 4b29d715: chore: move improvements from v5 to v6
|
|
8
|
+
|
|
9
|
+
Migrate improvements form v5 to v6:
|
|
10
|
+
|
|
11
|
+
- https://github.com/verdaccio/verdaccio/pull/3158
|
|
12
|
+
- https://github.com/verdaccio/verdaccio/pull/3151
|
|
13
|
+
- https://github.com/verdaccio/verdaccio/pull/2271
|
|
14
|
+
- https://github.com/verdaccio/verdaccio/pull/2787
|
|
15
|
+
- https://github.com/verdaccio/verdaccio/pull/2791
|
|
16
|
+
- https://github.com/verdaccio/verdaccio/pull/2205
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [4b29d715]
|
|
21
|
+
- @verdaccio/core@6.0.0-6-next.51
|
|
22
|
+
|
|
3
23
|
## 11.0.0-6-next.16
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdaccio/url",
|
|
3
|
-
"version": "11.0.0-6-next.
|
|
3
|
+
"version": "11.0.0-6-next.17",
|
|
4
4
|
"description": "url utilities resolver",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"private",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@verdaccio/core": "6.0.0-6-next.
|
|
37
|
+
"@verdaccio/core": "6.0.0-6-next.51",
|
|
38
38
|
"debug": "4.3.4",
|
|
39
39
|
"lodash": "4.17.21",
|
|
40
40
|
"validator": "13.7.0"
|
|
@@ -295,6 +295,27 @@ describe('env variable', () => {
|
|
|
295
295
|
delete process.env.VERDACCIO_PUBLIC_URL;
|
|
296
296
|
});
|
|
297
297
|
|
|
298
|
+
test('with the VERDACCIO_FORWARDED_PROTO undefined', () => {
|
|
299
|
+
process.env.VERDACCIO_FORWARDED_PROTO = undefined;
|
|
300
|
+
const req = httpMocks.createRequest({
|
|
301
|
+
method: 'GET',
|
|
302
|
+
headers: {
|
|
303
|
+
host: 'some.com',
|
|
304
|
+
[HEADERS.FORWARDED_PROTO]: 'https',
|
|
305
|
+
},
|
|
306
|
+
url: '/',
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
expect(
|
|
310
|
+
getPublicUrl('/test/', {
|
|
311
|
+
host: req.hostname,
|
|
312
|
+
headers: req.headers as any,
|
|
313
|
+
protocol: req.protocol,
|
|
314
|
+
})
|
|
315
|
+
).toEqual('http://some.com/test/');
|
|
316
|
+
delete process.env.VERDACCIO_FORWARDED_PROTO;
|
|
317
|
+
});
|
|
318
|
+
|
|
298
319
|
test('with a invalid X-Forwarded-Proto https and host injection with invalid host', () => {
|
|
299
320
|
process.env.VERDACCIO_PUBLIC_URL = 'http://injection.test.com"><svg onload="alert(1)">';
|
|
300
321
|
const req = httpMocks.createRequest({
|