Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Re: Mashup API context

Hi, ewg

We are currently using Qlik Sense 1.1 and perhaps something have changed since version 1.0 but we are running into following issue:

We want to pull Qlik Sense objects from our remote web site using Mashup API but are getting the following 403 error when opening an app:

qlik_error_response.PNG

From what I understand CORS has nothing to do with it since websockets are not restrained by the same origin policy. and also other files like qlik.js, client.js were loaded without any problems. So it must be the Qlik Sense server that enforces the origin policy.

So the question is: is there a way to allow origin on the server, so the handshake is carried successfully?

1 Solution

Accepted Solutions
Alexander_Thor
Employee
Employee

Try just allowing rustam-pc.cl.local alternatively you could add localhost to your white list and try browsing your website from localhost:3000 and see if it helps.

Edit: Also it looks like you are running a virtual proxy so make sure you are setting the whitelist for the correct proxy.
Btw it looks like you are getting dual session cookies also, are you sure that you are setting the correct prefix?

View solution in original post

4 Replies
ErikWetterberg

Hi Rustam,

from the screenshot it looks like you are using ws:, should probably be wss:

Check out the config object, usually in the beginning of the javascript file:

var config = {

   host: window.location.hostname,

   prefix: prefix,

   port: window.location.port,

   isSecure: window.location.protocol === "https:"


};

Try setting isSecure to true.

Erik

Not applicable
Author

Thanks for the answer, Erik!

Same error unfortunatelyqlik_error_response.PNG

I've also tried adding client host to the websocket origin white list with no success either...

web_socket_white_list.PNG

Alexander_Thor
Employee
Employee

Try just allowing rustam-pc.cl.local alternatively you could add localhost to your white list and try browsing your website from localhost:3000 and see if it helps.

Edit: Also it looks like you are running a virtual proxy so make sure you are setting the whitelist for the correct proxy.
Btw it looks like you are getting dual session cookies also, are you sure that you are setting the correct prefix?

Not applicable
Author

Thanks, Alexander!

Allowing domain without port number did the job.