RaceBase
RaceBase

Reputation: 18848

Ajax Cross domain request to non-controlled domain

I have been seeing lot of questions and answers here, but something really not answered my questions

  1. How do I make a cross domain request to a http://otherdomain.com?login.php?username="test"&pass="pass"

I would like to state that, this domain is not controlled by us and it will return normal HTTP response if you actually make a HTTP POST request to the above URL.

So based on the HTTP Response [HTML], I would like to evaluate successful or failure login.

Since it's an internal application, if it's not possible in normal scenario, we can configure internal system browsers to achieve the same [last option].

Can anyone post a link to tutorial/working example?

Note: I don't have control over otherdomain application. It doesn't return a JSON formatted data. The request must be originated from Clients browser, not allowed any proxy due to application dependance on IP address.

Upvotes: 0

Views: 161

Answers (1)

Quentin
Quentin

Reputation: 943100

See Ways to circumvent the same-origin policy. None of them will meet your requirements.

Preventing Mallory's site from using Alice's site with Bob's credentials (such as his IP address) is the point of the Same Origin Policy. There is no way around this for a web application.

Since it's an internal application

If it is an internal application, then you could look at using a browser extension to access the data. They have less restrictive security policies as they have to be explicitly installed.

Upvotes: 1

Related Questions