javascript - How to specify an external website for XMLHTTPRequest -


When using XMLHTTPRequest in JavaScript, I want to send it to an external website, instead of a where .js file hosted To send it to test.php on the current server, I will use

  request.open ("POST", "test.php", true);  

But for the second arguemnt, how do I send it to another website? "Example.com/test.php" looks for a file on the existing server, and "CAS" simply fails completely.

You can not for security reasons see for javascript.

There are a few ways to exploit the browser's bugs or corner cases, but they are not recommended.

The best approach is to be a server-side proxy that receives ajax request, and in turn, sends an HTTP request to other servers, it should be carefully applied that the types of requests to be sent to them And by logging into the whitelist, and the server has been contacted.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -