Service and Route

I use docker compose and the latest version of Kong (1.0.3) to test Kong. I try the doc’s example and it’s worked

curl -i -X POST
–url htp://localhost:8001/services/
–data ‘name=example-service’
–data ‘url=htp://’
curl -X POST htp://localhost:8001/services/example-service/routes --data ‘hosts[]
curl -i -X GET --url htp://localhost:8000 --header ‘Host:

I tried an other service and route and it doesn’t work

curl -i -X POST
–url http://localhost:8001/services/
–data ‘name=example-servicz’
–data ‘url=htp://’
curl -i -X POST htp://localhost:8001/services/example-servicz/routes --data ‘hosts[]
curl -i -X GET --url htp://localhost:8000/characters/583 --header ‘Host:

I get a 301 return code.

Can you explain me the mistake ?

PS: i remove a t in http to bypass the validation.

Are you sure that the 301 comes from Kong? What are your response headers?

this is the call, the response headers and the body is empty.

curl -i -X GET --url http://localhost:8000 --header ‘Host:

HTTP/1.1 301 Moved Permanently

Transfer-Encoding: chunked

Connection: keep-alive

Cache-Control: max-age=3600

Expires: Thu, 21 Feb 2019 23:54:22 GMT


Server: cloudflare

CF-RAY: 4acccb616987a8a5-CDG

X-Kong-Upstream-Latency: 17

X-Kong-Proxy-Latency: 30

Via: kong/1.0.3

Le jeu. 21 févr. 2019 à 19:59, Aapo Talvensaari via Kong Nation a écrit :

@Laurent_Rouleau did you ever figure this out? I’m having the same problem now.

© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ