Closed rjpalermo1 closed 5 years ago
Hi @rjpalermo1 and welcome to the KrakenD community!
TL;DR: I think the problem is with the selected backend hostname. Changing to http://www.mocky.io
will fix it.
I've been testing this configuration:
{
"version": 2,
"timeout": "3000ms",
"cache_ttl": "300s",
"name": "Proto",
"port": 8099,
"endpoints": [
{
"endpoint": "/addresses/ko",
"method": "POST",
"backend": [
{
"url_pattern": "/v2/5c9392b53100004b00554606",
"host": [ "http://mocky.io" ],
"group": "address"
}
],
"headers_to_pass": [ "Content-Type" ]
},
{
"endpoint": "/addresses/ok",
"method": "POST",
"backend": [
{
"url_pattern": "/v2/5c9392b53100004b00554606",
"host": [ "http://www.mocky.io" ],
"group": "address"
}
],
"headers_to_pass": [ "Content-Type" ]
}
]
}
Notice both endpoint are identical to your configuration (without the not needed params). The only difference between them is the host (and the endpoint url pattern).
$ curl -id'{"a":42}' localhost:8099/addresses/ko
HTTP/1.1 500 Internal Server Error
X-Krakend: Version 0.8.0
X-Krakend-Completed: false
Date: Thu, 21 Mar 2019 14:41:27 GMT
Content-Length: 0
$ curl -id'{"a":42}' localhost:8099/addresses/ok
HTTP/1.1 200 OK
Cache-Control: public, max-age=300
Content-Type: application/json; charset=utf-8
X-Krakend: Version 0.8.0
X-Krakend-Completed: true
Date: Thu, 21 Mar 2019 14:41:30 GMT
Content-Length: 39
{"address":{"response":"Hello Ladies"}}
The reason is a combination of two factors:
http://mocky.io
are redirected to https://www.mocky.io
. Requests to http://www.mocky.io
are served directlyError #01: Get https://www.mocky.io/v2/5c9392b53100004b00554606: x509: certificate signed by unknown authority
YES!
That was it. All good now.
Will close this and open another regarding the filter blacklist. (UPDATE: FIXED)
Thank you for your quick reply!
This issue was marked as resolved a long time ago and now has been automatically locked as there has not been any recent activity after it. You can still open a new issue and reference this link.
I give and need help...
fair to mid level experience with APIS, looking for alternative to Kong and love the message of KrakenD but cannot make progress on even the simple stuff.
brew install on MAC
I cannot do a simple POST. Can do GETs all day long (although the blacklist filter does not work for me) but trying a simple POST to an endpoint cannot get anything except
Here is my json file created from Designer:
CONSOLE
What am I doing wrong here?