Background:
I am using a CMS which is using xajax. I am also using a proxy server in front of the webserver, which is provided by my hosting provider. The proxy server SSL enables my site without the need for my own certificate. However the proxy also modifies the request.
Reproduce steps:
Call https://sslsites.de/www.my-website.de/cms.php
Then the proxy at sslsites.de calls http://www.my-website.de/cms.php
Then the CMS instanciates xajax() without parameters (which means auto detect xajax requestURI)
Then upon some user interaction, xajax sends a request.
Expected result:
xajax sends the request to https://sslsites.de/www.my-website.de/cms.php
Actual result:
xajax sends the request to https://sslsites.de/cms.php
Cause:
xajax does not expect the file in the http request to be changed between client and server. https://sslsites.de/somefile.php is obviously wrong, because it is an invalid address. The problem lies in xajax::_detectURI .
Fix:
I think there is an easy fix which also makes the complicated xajax::_detectURI obsolete. The fix is: Detect the default URI on client side instead of server side. In other terms, when there is no requestURI given to xajax, make xajax.config.requestURI = windows.URL;