Global Directory
Global Directory
EXPLORE OUR SITES
London Stock Exchange Group
LSEG Data & Analytics
MyAccount
LSEG Perspectives
London Stock Exchange
FTSE Russell
LCH
Contact Us
Home
TR Internal
Implementation of routing page's additional "Request Headers"
brian.schuweiler
How is the routing page's additional request headers field implemented in Website? It appears that the additional headers you specify will be included in any request to modules issued by Website server side but won't be included in any ajax request to modules. Could this be done?
Find more posts tagged with
ajax
static-data
refinitiv-internal
Accepted answers
Adam.Lemker
James is right about the half baked part. The headers are only added to outgoing server-side calls. Adding them to AJAX calls would probably require including the array of headers in the JavaScript on every page or storing them in a cookie. On top of this, they would need to be hooked into the Cobalt.Net.WebRequest code.
If I remember correctly, we left out the AJAX side of it because the people requesting this only needed it on server-side calls and we didn't have the time for the addition to the JavaScript.
All comments
mark.maruska
This sounds like a Website feature request (?).
James Greene
Check with
@AdamLemker
, looks like he implemented it originally.
My guess is that it is only half-baked (no offense to Adam), such that Website will pass those headers on server-side calls but not on AJAX calls. Additionally, the HttpClient infrastructure libraries might need to be updated to support passing these headers along for server-side calls beyond Website (e.g. Document calling DataOrchestrator).
brian.schuweiler
Possibly - wasn't sure what was already implemented when that was added to the routing page. Plus, wanted an understanding of how it does work today.
Adam.Lemker
James is right about the half baked part. The headers are only added to outgoing server-side calls. Adding them to AJAX calls would probably require including the array of headers in the JavaScript on every page or storing them in a cookie. On top of this, they would need to be hooked into the Cobalt.Net.WebRequest code.
If I remember correctly, we left out the AJAX side of it because the people requesting this only needed it on server-side calls and we didn't have the time for the addition to the JavaScript.
brian.schuweiler
Thanks for the good info Adam - sounds like if the desire exists for those optional headers to be passed along on ajax calls we'd need to pursue that in Website/Static Content
James Greene
Schu: Should be pretty easy to implement the AJAX header passing. My bigger concern would be if the HttpClient libs are going to pass them along... my guess is that it would not, since it can't really anticipate what custom headers you'll be setting/overriding. That would probably have to be done manually...?
brian.schuweiler
I heard a rumor (unconfirmed) that the infrastructure HttpClients will honor headers with certain prefixes (e.g. x-cobalt-product...) so it _may_ work.
Quick Links
All Forums
Recent Questions
Terms of use
Privacy & Cookie Statement
Cookies settings
Do not sell my info
Whistleblowing
UK Bribery Act
Modern Slavery Act