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

Support basic auth, send API requests via proxy server #59

Merged
merged 4 commits into from
Dec 25, 2016

Conversation

nite-knite
Copy link
Contributor

Replace the original server with a koa app.
All API requests will be sent to kong-dasboard server and then passed to appointed kong nodes.
New kong-dashboard server (optionally) supports basic auth itself (so that kong admin API can be set to only accessible locally).
Serve dashboard page at /dashboard since all requests (including GET /) will be forwarded to kong node.

@PGBI
Copy link
Owner

PGBI commented Nov 25, 2016

@NKCoding Thanks a lot for your contribution!

However I noticed the -p option doesn't work anymore:

# this still launches kong dashboard on port 8080:
kong-dashboard start -p 9000

Could you fix that?

@nite-knite
Copy link
Contributor Author

@PGBI OK, I'll look into it.

@nite-knite
Copy link
Contributor Author

@PGBI
Now it works and handles unsupported options and commands in a better way.
In the non-basic-auth mode, server respond with 400 rather than 500 when Kong-Node-URL header is missing.

@PGBI PGBI merged commit a80643b into PGBI:master Dec 25, 2016
@PGBI
Copy link
Owner

PGBI commented Dec 25, 2016

@NKCoding Sorry again for the time it took to merge. It's now done. Thanks for your contribution!

I did change some things:

  • the proxy server was listening at "/" while the angular app was served at "/dashboard". I changed that to keep the current behavior: angular app is server at "/" while the proxy servers listens at "/proxy".
  • If the Kong API was itself protected by basic auth, you needed to set the same name/password for the API and when starting kong-dashboard. Now you can protect Kong-dashboard with some credentials while having Kong API being protected with other credentials.

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

Successfully merging this pull request may close these issues.

None yet

2 participants