Is there a way to make an ajax request from IBM Connections XCC without it being proxied?
let api = 'https://my-server2/api.xml'
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = () => {
if (xmlhttp.readyState == XMLHttpRequest.DONE)
if (xmlhttp.status == 200) {
console.log(xmlhttp.responseText)
}else {
console.log(`Error: ${xmlhttp.readyState}`)
}
}
When I try to make a request to
https://connections-host/communities/ajaxProxy/https/my-server2/api.xml
, it gets proxied over the connections server leading to an empty API result due to the need for an authorized user session. My assumption was that because the user is already logged into the my-server2
application in their browser, the ajax request should retrieve the API information in the user context.
My question is: How do I bypass this proxy?
It seems like connections may manipulate the XMLHttpRequest
class, possibly similar to this code snippet: https://gist.github.com/dewdad/8830348
I'd like to inspect the code to understand the manipulation within the console, but it only shows native code
window.XMLHttpRequest.prototype.open.toString()
"function open() {
[native code]
}"