From fc9ff61b486b6080c77efff5cbdea5898e776a2b Mon Sep 17 00:00:00 2001 From: Rich Snapp Date: Thu, 29 Apr 2021 15:22:49 -0600 Subject: [PATCH] add X-Prebid header to ajax requests fixes #6627 --- src/ajax.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ajax.js b/src/ajax.js index b1e4cbdbdff..d96eb1bb5be 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -75,11 +75,12 @@ export function ajaxBuilder(timeout = 3000, {request, done} = {}) { if (options.withCredentials) { x.withCredentials = true; } + x.setRequestHeader('x-prebid', 'pbjs/$prebid.version$'); utils._each(options.customHeaders, (value, header) => { x.setRequestHeader(header, value); }); if (options.preflight) { - x.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); + x.setRequestHeader('x-requested-with', 'XMLHttpRequest'); } x.setRequestHeader('Content-Type', options.contentType || 'text/plain');