跟进my earlier question,我意识到即使我通过SSH连接到我的OpenShift容器并尝试手动cURL一个HTTPS URL,它似乎也会在内部重新路由到HTTP等价物。我怎样才能真正访问HTTPS版本?
从我的本地机器:
$ curl -X POST -H “Authorization: Basic <TOKEN>” -H “Content-Type: application/x-www-form-urlencoded” -H “Content-Length: 0” https://api.stubhub.com/login
{”error”:”invalid_request”,”error_description”:”Missing grant_type parameter value”}
从我的远程机器(通过SSH):
> curl -X POST -H “Authorization: Basic <TOKEN>” -H “Content-Type: application/x-www-form-urlencoded” -H “Content-Length: 0” https://api.stubhub.com/login
<HTML><HEAD>
<TITLE>Access Denied</TITLE>
</HEAD><BODY>
<H1>Access Denied</H1>
You don't have permission to access “http://api.stubhub.com/login” on this server.<P>
Reference #18.63de6bd1.1459386064.30c676b
</BODY>
</HTML>
请注意后者的回复正文中的http
网址。
(当然,我正在使用工作/测试<TOKEN>
。)
答案 0 :(得分:1)
您应该联系stubhub并查看它们是否阻止您尝试连接的IP地址。我可以毫无问题地从OpenShift Online中卷曲其他https网址。