Skip to content

Commit e864c90

Browse files
fix origin path
1 parent 6528eb9 commit e864c90

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/getOriginConfig.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const url = require('url')
33
module.exports = (origin, { originAccessIdentityId = '' }) => {
44
const originUrl = typeof origin === 'string' ? origin : origin.url
55

6-
const { hostname } = url.parse(originUrl)
6+
const { hostname, pathname } = url.parse(originUrl)
77

88
const originConfig = {
99
Id: hostname,
@@ -12,7 +12,7 @@ module.exports = (origin, { originAccessIdentityId = '' }) => {
1212
Quantity: 0,
1313
Items: []
1414
},
15-
OriginPath: ''
15+
OriginPath: pathname === '/' ? '' : pathname
1616
}
1717

1818
if (originUrl.includes('s3')) {

0 commit comments

Comments
 (0)