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

Feature Req: http-proxy support #23

Closed
noogen opened this issue Feb 7, 2016 · 2 comments
Closed

Feature Req: http-proxy support #23

noogen opened this issue Feb 7, 2016 · 2 comments

Comments

@noogen
Copy link

noogen commented Feb 7, 2016

I'm having a tough time setting up what was recommended in issue #22. Default Kong Admin CORS support doesn't seem to play well with basic-auth plugin, especially across different browsers. I can't seem to override it with the CORS plugin either. Would it be possible to get http-proxy support for this dashboard?

Example implementation/mod (expressjs): https://github.com/niiknow/kong-dashboard
Dashboard deployed: http://dock1.brickinc.net:8080/ (demo basic-auth security)
I setup Kong API endpoint as recommended in issue #22 and docker environment variable KONG_URL=http://kong-api:8001/kong

As an example where kong-api is on dock4 host. Also disabled docker port mapping to 8001: http://dock4.brickinc.net:8001 (disabled) vs http://dock4.brickinc.net:8000 and http://dock4.brickinc.net:8443
Kong Rancher Docker Compose: https://github.com/trybrick/community-catalog/blob/master/templates/kong/0/docker-compose.yml

Documentation/Docker: https://hub.docker.com/r/brickinc/kong-dashboard/

Of course, this feature may prevent the SPA to be statically hosted only scenario. Alternative solution would be to use aerobatic service ( https://www.aerobatic.com/) which provide free static hosting and added proxy backend to overcome CORS.

Another use-case for the proxy is with Docker management like Rancher/TumTum. Point everything to Rancher internal IPs and firewall/enable the dashboard on a needed basis.

** My issue may just be a configuration issue or it may be a Kong issue. I do not know. It may be that we need better documentation on how to set it up. As I noted before, if CORS is working correctly, there are great benefit for this App to be statically hosted only. This way, everyone can use the same App to access their API from anywhere. Excellent work by the way! Thanks for sharing and keep up the great work!

@PGBI
Copy link
Owner

PGBI commented Feb 10, 2016

I have a hard time deciding myself if it is better or not to have requests being proxied by a backend service. As you said, there are great benefits in having the app be statically hosted only.

As I said in #22 I currently don't have any time to implement this kind a feature right now, it involves a lot of code rewriting. But if anybody is willing to make a PR (and provide support for it afterwards) I'll be happy to merge it.

Now, I know it is possible to manage Kong admin API behind Kong gateway and basic-auth plugin. I did it myself and it works. I'll come up with a more detailed documentation to explain how to set it up correctly.

@PGBI
Copy link
Owner

PGBI commented Dec 26, 2016

PR #59 solved this.

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