Skip to content

Commit

Permalink
Don't append url on every buildrequest
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcpn-emil committed Nov 22, 2023
1 parent b2c5f79 commit 63542c1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/conceptxBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { BANNER } from '../src/mediaTypes.js';
// import { logError, logInfo, logWarn, parseUrl } from '../src/utils.js';

const BIDDER_CODE = 'conceptx';
let ENDPOINT_URL = 'https://conceptx.cncpt-central.com/openrtb';
const ENDPOINT_URL = 'https://conceptx.cncpt-central.com/openrtb';
// const LOG_PREFIX = 'ConceptX: ';

export const spec = {
Expand All @@ -16,10 +16,10 @@ export const spec = {
buildRequests: function (validBidRequests, bidderRequest) {
// logWarn(LOG_PREFIX + 'all native assets containing URL should be sent as placeholders with sendId(icon, image, clickUrl, displayUrl, privacyLink, privacyIcon)');
const requests = [];

let requestUrl = `${ENDPOINT_URL}`
if (bidderRequest && bidderRequest.gdprConsent && bidderRequest.gdprConsent.gdprApplies) {
ENDPOINT_URL += '?gdpr_applies=' + bidderRequest.gdprConsent.gdprApplies;
ENDPOINT_URL += '&consentString=' + bidderRequest.gdprConsent.consentString;
requestUrl += '?gdpr_applies=' + bidderRequest.gdprConsent.gdprApplies;
requestUrl += '&consentString=' + bidderRequest.gdprConsent.consentString;
}
for (var i = 0; i < validBidRequests.length; i++) {
const requestParent = { adUnits: [], meta: {} };
Expand All @@ -33,7 +33,7 @@ export const spec = {
requestParent.adUnits.push(adUnit);
requests.push({
method: 'POST',
url: ENDPOINT_URL,
url: requestUrl,
options: {
withCredentials: false,
},
Expand Down

0 comments on commit 63542c1

Please sign in to comment.