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

Add API: path depth #310

Closed
crazy8brown opened this issue Jun 8, 2015 · 1 comment
Closed

Add API: path depth #310

crazy8brown opened this issue Jun 8, 2015 · 1 comment
Assignees
Milestone

Comments

@crazy8brown
Copy link

When adding a new API and routing using the path parameter, Kong only supports a "1 deep" resource path. For instance:

curl -X POST http://localhost:8001/apis --data 'name=test2' --data 'target_url=http://myapiserver:8080/someapi' --data 'path=/api/'

works, but:

curl -X POST http://localhost:8001/apis --data 'name=test2' --data 'target_url=http://myapiserver:8080/someapi' --data 'path=/api/v1/'

Does not. Note the difference /api/ vs /api/v1/

When trying to add a deep path, Kong responds with:

{"path":"path must only contain alphanumeric and '. -, _, ~' characters"}

Kong should support arbitrary path depth.

@thibaultcha
Copy link
Member

#318 implements this

thibaultcha added a commit that referenced this issue Jun 9, 2015
- Add `/` in the list of allowed path characters
- Added much stronger path validation and sanitization that will also
  avoid duplicated path cause by trailing slashes

Fix #310
ctranxuan pushed a commit to streamdataio/kong that referenced this issue Aug 25, 2015
- Add `/` in the list of allowed path characters
- Added much stronger path validation and sanitization that will also
  avoid duplicated path cause by trailing slashes

Fix Kong#310


Former-commit-id: 48b6fdc8c77067f971afcabf4344085298f331d9
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