Pritam Banerjee Pritam Banerjee - 7 months ago 30
Javascript Question

How to fix Cross Origin Request Sharing issue in Chromium Portable?

I am trying to fix CORS issue in Chromium Portable. Added

--allow-file-access-from-files --disable-web-security


Works for the older versions but not for the latest one. Will not be able to modify anything on the server side and also cannot use
jsonp
.

The error I am getting in the console is :

jquery.min.js:4 XMLHttpRequest cannot load https://website/heaarc/rest/HaAccess/hello. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'file://' is therefore not allowed access. The response had HTTP status code 401.


Is there any other way to fix this?

Any help would be greatly appreciated.

Answer

Finally solved this by adding an updated flag for chromium.

The flag is:

-disable-web-security -user-data-dir

Also to prevent any warning messages and popups, I used this:

-test-type
Comments