cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
996
Views
0
Helpful
2
Replies

Download an xml report from CUIC and display in Finesse

I'm making a gadget for Finesse that downloads Detailed Call CSQ Agent report as xml from CUIC and displays a list of calls the agent received. The problem is that CUIC does not allow me to download the XML content to the Finesse gadget because the Origin is not the same as the source. The error I get:

XMLHttpRequest cannot load https://hostname:8444/cuic/permalink/PermalinkViewer.htmx?viewId=F52A08751000014B3835F5E80AB43E68&linkType=xmlType&viewType=Grid. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://hostname:8445' is therefore not allowed access. The response had HTTP status code 403.

Opening this url in a browser works fine, the XML is displayed. Also, if I disable web security in my browser everything works fine also, and would maybe pass as a solution for this problem if I wasn't making this gadget for a bank

Anyone have an idea on how to get the xml content in other ways that will work or do I need to ask for a change on CUIC side to allow Access-Control-Allow-Origin from anywhere?

Finnur

2 Replies 2

ewindgat
Level 5
Level 5

This sounds like a cross browser security issue. Let me know if this helps.

HTTP access control (CORS) - HTTP | MDN

https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS

This would help if I had access to Tomcat on CUIC and could add the Access-Control-Allow-Origin: * setting there

Changing the browser setting to disable web security does work, but like I said before, it's not an acceptable solution for this case.

There is one thing I have not tried that might solve this and that is to send authentication info instead of setting this link to allow unauthenticated access. I really really hope that works because if it doesn't it looks like I will have to find a different way to access the xml document. I will post info on how that goes if I can figure out how to do it. If someone know how to do it or knows if that works better, info would be very much appreciated.

Finnur

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: