Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
arvind1494
Specialist
Specialist

How to handle CORS in javascript ??

Hi all extension developer ,

Can you help me for this :

I am developing one extension in which i need to make one GET /POST call with url =http://localhost:4848/Exports/05207f84-7d12-43e0-9392-56a9e5ca2c3b/f170f1c3-c40e-4c2d-afd9-8b10f56da...

It is dynamically created url

but when I try this browser throws following error:

Failed to load http://localhost:4848/Exports/05207f84-7d12-43e0-9392-56a9e5ca2c3b/f170f1c3-c40e-4c2d-afd9-8b10f56da... Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.

There fore I need to make CORS in this case can you tell me how to do it.

1 Reply
ErikWetterberg

HI,

For CORS to work there need to be web server support for it. Looks like you are trying to do this with Qlik Sense desktop and since Qlik Sense desktop does not support CORS that won’t work.

Erik Wetterberg

Extending Qlik – Use Qlik in your own apps and sites