Skip to content

Commit

Permalink
fix: (STRF-9087) set upstream=storefront to support multiple channels…
Browse files Browse the repository at this point in the history
… in start command
  • Loading branch information
MaxGenash committed Mar 29, 2021
1 parent 7105fa2 commit 3f6b8ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/utils/NetworkUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class NetworkUtils {
...restOpts,
headers: {
'x-auth-client': 'stencil-cli',
'x-bc-upstream': 'storefront',
'stencil-cli': this._packageInfo.version,
'stencil-version': this._packageInfo.config.stencil_version,
...(restOpts.headers || {}),
Expand Down
4 changes: 4 additions & 0 deletions lib/utils/NetworkUtils.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ describe('NetworkUtils', () => {
maxBodyLength: Infinity,
headers: {
'x-auth-client': 'stencil-cli',
'x-bc-upstream': 'storefront',
'stencil-cli': packageInfoMock.version,
'stencil-version': packageInfoMock.config.stencil_version,
},
Expand Down Expand Up @@ -70,6 +71,7 @@ describe('NetworkUtils', () => {
headers: {
'content-type': extraHeaders['content-type'],
'x-auth-client': 'stencil-cli',
'x-bc-upstream': 'storefront',
'stencil-cli': packageInfoMock.version,
'stencil-version': packageInfoMock.config.stencil_version,
},
Expand Down Expand Up @@ -110,6 +112,7 @@ describe('NetworkUtils', () => {
'content-type': extraHeaders['content-type'],
'x-auth-client': extraHeaders['x-auth-client'],
'stencil-cli': extraHeaders['stencil-cli'],
'x-bc-upstream': 'storefront',
'stencil-version': packageInfoMock.config.stencil_version,
},
});
Expand Down Expand Up @@ -144,6 +147,7 @@ describe('NetworkUtils', () => {
headers: {
'x-auth-token': accessToken,
'x-auth-client': 'stencil-cli',
'x-bc-upstream': 'storefront',
'stencil-cli': packageInfoMock.version,
'stencil-version': packageInfoMock.config.stencil_version,
},
Expand Down

0 comments on commit 3f6b8ed

Please sign in to comment.