Closed allantatter closed 6 years ago
dev-master is still under development, I'll see what I can do this weekend.
When I create a custom Request object such as new Request('http://localhost/foo/bar', 'GET');
it does work, but when I use ServerRequestFactory::fromGlobals()
it doesn't. Can you check if this is the same problem for you?
When I created Guzzle
's Request
and passed it down, then it did work (if I remember correctly). I cannot confirm atm, away from work machine.
This somewhat works, at least I get response from the app I expect.
//$request = ServerRequestFactory::fromGlobals();
$request = new Zend\Diactoros\Request('http://127.0.0.1:3000', 'GET');
Could you add v2.2.2 tag to commit 1b79a3a (30 May 2015 22:02:26 GMT+3)? At least that one works for me and problem with v2.2.1 is that I depend on Guzzle v6.
@allantatter I had php7 and like to use most simplest code, but not sure how to use this.
Can you please share code. so when I use proxy in browser it will start to work.
@tejastank The idea of proxying requests through PHP scripts is evil in its roots (I tried it because I needed the solution super fast to make things just work) :D I'd not recommend using it in production if possible (too large performance hit to the server). Do you have Nginx running behind PHP? Easier to give an advice for that.
@allantatter thanks mate, I left this right now. use python based my own japranto code, will do use in some future... :)
is there example for nginx config?
I wanted to create a simple demo to check whether I can get this working so I have 2 blank Laravel installations side by side, I run them locally on OS X with Mamp on domains site1.dev, site2.dev.
I want to proxy requests from site1.dev to site2.dev but when I visit http://site1.dev then it keeps loading forever with no response. However, when I do simple
file_get_contents('http://site2.dev')
then it goes through and gets response with status code 200 and correct html in response.I used the example code from readme:
I'm using
dev-master
version here.Any ideas?