Skip to content

Commit

Permalink
Merge pull request #84 from adobecom/MWPW-124985
Browse files Browse the repository at this point in the history
feat(MWPW-124985): Adding floodgate support via header param in config
  • Loading branch information
sanrai authored Jul 27, 2023
2 parents 33b534d + 57f59a6 commit c9da2de
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dist/app.css

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions dist/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Chimera UI Libraries - Build 7/27/2023, 14:01:43
* Chimera UI Libraries - Build 7/27/2023, 14:35:29
*
*/
/******/ (function(modules) { // webpackBootstrap
Expand Down Expand Up @@ -1631,7 +1631,8 @@ var DEFAULT_CONFIG = exports.DEFAULT_CONFIG = {
noResultsDescription: 'We couldn\u2019t find any results for your {query}.{break}\n Check your spelling or try broadening your search.'
}
},
language: 'en'
language: 'en',
headers: []
};

/**
Expand Down Expand Up @@ -6429,6 +6430,7 @@ var Container = function Container(props) {
var sortEnabled = getConfig('sort', 'enabled');
var cardStyle = getConfig('collection', 'cardStyle');
var title = getConfig('collection', 'i18n.title');
var headers = getConfig('headers', '');

/**
**** Constants ****
Expand Down Expand Up @@ -7202,7 +7204,8 @@ var Container = function Container(props) {
var endPoint = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : collectionEndpoint;

return window.fetch(endPoint, {
credentials: 'include'
credentials: 'include',
headers: headers
}).then(function (resp) {
var ok = resp.ok,
status = resp.status,
Expand Down
6 changes: 3 additions & 3 deletions dist/main.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/main.source.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions react/src/js/components/Consonant/Container/Container.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ const Container = (props) => {
const sortEnabled = getConfig('sort', 'enabled');
const cardStyle = getConfig('collection', 'cardStyle');
const title = getConfig('collection', 'i18n.title');
const headers = getConfig('headers', '');

/**
**** Constants ****
Expand Down Expand Up @@ -750,6 +751,7 @@ const Container = (props) => {
function getCards(endPoint = collectionEndpoint) {
return window.fetch(endPoint, {
credentials: 'include',
headers,
})
.then((resp) => {
const {
Expand Down
1 change: 1 addition & 0 deletions react/src/js/components/Consonant/Helpers/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ export const DEFAULT_CONFIG = {
},
},
language: 'en',
headers: [],
};

/**
Expand Down

0 comments on commit c9da2de

Please sign in to comment.