Skip to content

Commit

Permalink
Merge pull request #699 from MaxGenash/STRF-9087_Stencil_localhost_on…
Browse files Browse the repository at this point in the history
…ly_shows_default_storefront_data

fix: (STRF-9087) set upstream=storefront to support multiple channels in start command
  • Loading branch information
Max Genash authored Mar 30, 2021
2 parents 7105fa2 + 3f6b8ed commit eaff7ee
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 eaff7ee

Please sign in to comment.