Hello, tell me please, is there any browser from which you can make a cross-domain query from javascript without long dances with a tambourine? I need to debug testing AJAX requests on a client and, due to security restrictions, I can’t do this. Many people write that this is impossible, some that are possible, but they did not succeed in doing this. Is there an easy way for this?

  • You can write your browser. Those who are for safety will not be allowed to make a request - Grundy
  • one
    @Grundy seems to be possible if the server is properly configured. And here they write how to make chrome ignore safety) - BOPOH
  • @Grundy because of the security policy, you cannot send ajax from one site to another without permission. You need to configure the server - Vasily Barbashev
  • @ Vasily Barbashev, as I understood from the question to the server there is no access - Grundy
  • @BOPOH, in theory, and with other browsers, something like this is possible - Grundy

2 answers 2

Greetings

You can add the --disable-web-security flag in the launch label of Chromium or its derivatives (Chrome, Yandex.Browser, etc.)

The browser must be restarted after that.

    All security is limited by YOUR browser. If a remote server (where requests are sent) does not support using .htaccess:

     <IfModule mod_headers.c> SetEnvIf Origin "^https?://(www\.)?(firstdomain\.ru|seconddomain\.com|otherdomain\.ru)(:\d{1,5})?$" AccessControlAllowOrigin=$0 Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin Header set Access-Control-Allow-Credentials true </IfModule> 

    or response headers:

     Access-Control-Allow-Origin, равный *