Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
mamltdv
Contributor
Contributor

CORS on Qlik Sense Desktop

Hi all,

I am new to Qlik and I am testing the Desktop version to call the API from a web page.
I have created a simple example, but I get the following error:

Access to XMLHttpRequest at 'http://localhost:4848/api/v1/csrf-token' from origin 'http://localhost:8080' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I have read that you can modify this in the server configuration, but I cannot find how to do it in the Desktop version.

Thanks in advance,
Miguel Ángel

Labels (3)
4 Replies
Nagesh_Bandaru
Contributor II
Contributor II

I Also have the same issue, tried multiple options and nothing worked. Eagarly looking for the solution. @Anonymous team can help us with this?

Damien_Villaret
Support
Support

Hello @mamltdv 

Can you provide a sample code showing which API you are trying to call and steps to replicate the issue ?

If the issue is solved please mark the answer with Accept as Solution.
Nagesh_Bandaru
Contributor II
Contributor II

Runnning below command from the Run is fixed the issue:

chrome.exe --user-data-dir="C://Chrome dev session" --disable-web-security

Christopher_prem

CORS- It allows you to make requests from one website to another website in the browser, which is normally prohibited by another browser policy. As this is security-related. there are no specific settings on qlik sense desktop to avoid this error.

Alternatively, you can create a chrome browser shortcut with web security disabled.

Launch chrome exe with the parameter which disables the web security 

Example: 

chrome.exe --user-data-dir="C://tmpChromeSession" --disable-web-security

 

https://stackoverflow.com/questions/24290149/creating-google-chrome-shortcut-with-disable-web-securi...