Skip to content
This repository has been archived by the owner on Apr 27, 2020. It is now read-only.

Unable to fetch URL from Query parameter #36

Closed
r3ver53r opened this issue May 10, 2016 · 6 comments
Closed

Unable to fetch URL from Query parameter #36

r3ver53r opened this issue May 10, 2016 · 6 comments

Comments

@r3ver53r
Copy link

Hi,

As per the script, the domain should be entered in the below format:
https://mydomain.com/miniProxy.php/http://example.net/

Although, my web server is treating it as a normal path and giving a 404 error.

If I change the "/" to "?", as mentioned below, then the proxy works fine. Please check.
https://mydomain.com/miniProxy.php?http://example.net/

@r3ver53r
Copy link
Author

Proposed fix on line 67:

define("PROXY_PREFIX", "http" . (isset($_SERVER['HTTPS']) ? "s" : "") . "://" . $_SERVER["SERVER_NAME"] . ($_SERVER["SERVER_PORT"] != 80 ? ":" . $_SERVER["SERVER_PORT"] : "") . $_SERVER["SCRIPT_NAME"] . "?");

@joshdick
Copy link
Owner

Out of curiosity, what web server are you using?

@r3ver53r
Copy link
Author

It is nginx/1.10.0.

You seem to be passing REST style params[0] which may not be supported by default.

[0] https://mydomain.com/miniProxy.php/REST_Param1

@htdat
Copy link

htdat commented May 17, 2016

Just confirm this.
I have the same issues with r3ver53r
Server: nginx/1.4.6 (Ubuntu)

@prysme01
Copy link

Same here with nginx/1.9.10
Any workaround ?

@joshdick
Copy link
Owner

@r3ver53r Finally had time to test your proposed fix (wanted to make sure it played correctly with POST data.)

Everything looked good so I made the change; thanks for the suggestion!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants