Closed jjhesk closed 9 years ago
I can't see anything obvious that would be causing the issue, and I have worked on a project where Wordpress successfully connects to a Keystone-powered API to load content.
The fact that the cURL works from Chrome but not PHP (and since I have seen PHP successfully connect to Keystone APIs) makes me suspect it's not a problem with Keystone itself.
There may be something specific to your Keystone config but it's hard to say without seeing all the info (route config, etc)
Our google group would be a better place to ask this question, in case someone else has experience with it or can see the problem you're having.
You may also want to post your own question (with the information you've included above) on Stack Overflow, mentioning that the solution to the other question didn't work for you.
Unless you can identify something about Keystone's server config or middleware that's causing the problem (in which case please open another issue with the details) this is out of scope for our issue tracker.
I have made the issue on google group and there is the only i can conclude all the conditions: Referred to : https://groups.google.com/forum/#!topic/keystonejs/4x-5HRKeQdc
There are a few scenarios local host php ->request -> this keystone with 3000 port -> not working, and time out fail to connecting to the server code: 28 hosting php ->request -> another keystone framework on 3000 port -> not working, and time out fail to connecting to the server code: 28 hosting php ->request -> another keystone framework on 4100 port -> not working, and time out fail to connecting to the server code: 28 hosting php ->request -> another keystone framework on 4800 port -> not working, and time out fail to connecting to the server code: 28
hosting php ->request -> another nodjs frameowork not keystone -> working browser chrome REST client -> request -> this keystone with 3000 port -> working browser chrome REST client -> request -> this keystone with 4100 port -> working browser chrome REST client -> request -> another keystone framework on 3000 port -> working check aws IP table policy and they are all opened
@JedWatson If you have the working sample from wordpress making requests to keystonejs, please show me the code. Because I have tried many ways to do a simple curl just to get the response from the keystone side.
I have no idea but I just figured that the instance on AWS cloud will only allow port 80 for server side request and this is the only port that will allow external php request. I have also checked on the console for custom policies and I found that there was nothing noticed that could block other ports.. maybe someone can help me to clarify this issue.
The issue is that when I try make a request from the REST client in DHC on chrome browser it works and the console log down the POST request path with the code 200 immediately. However when I try to make a server side api from php with the same request it will return an error and tell me the "failed to connect" the same path with port 3000. I investigated the cause of the error and I couldn't find anything about it. I found a similar issue on stackover flow on http://stackoverflow.com/questions/23052955/nodejs-server-accepting-a-php-curl
and I did the exactly same thing to my server and didn't work on keystone. I wonder if there are anything or settings that I have not discovered on the api server callback.
api end point code..
I did it with hardcoded IP and domain address with http and both did not work.