Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kong fails to match request_path ="/" ? #880

Closed
leozc opened this issue Jan 14, 2016 · 4 comments
Closed

Kong fails to match request_path ="/" ? #880

leozc opened this issue Jan 14, 2016 · 4 comments

Comments

@leozc
Copy link

leozc commented Jan 14, 2016

To reproduce:

curl localhost:8001/apis
{"data":[{"upstream_url":"https://example.com/","request_path":"/api/v2","id":"YYYY","name":"api-v2","created_at":xxx}
{"data":[{"upstream_url":"https://example.com/","request_path":"/","id":"xxx","name":"","created_at":xxx}]}

curl localhost:8000
{"request_path":"/","message":"API not found with these values","request_host":["localhost"]}

However if request to:

curl localhost:8000/api/v2
this is fine.

@thibaultcha
Copy link
Member

Yes, here you must access your API with the /api/v2 prefix path as it is the request path you chose for your API. / is not a valid request_path.

@leozc
Copy link
Author

leozc commented Jan 14, 2016

Arh, great, I meant to use / as a fallback value .
I think this is related to issue #847

@thibaultcha
Copy link
Member

Were you able to create an API with a request_path value of /? If so, that is not supposed to be so, there should have been an error.

@leozc
Copy link
Author

leozc commented Jan 14, 2016

@thibaultcha yes I am able to create an API with a request_path value of "/".

kong --version
Kong version: 0.5.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants