cjmamo / kafka-web-console

A web console for Apache Kafka (retired)
Apache License 2.0
762 stars 246 forks source link

URL prefix? #25

Closed jpotter closed 10 years ago

jpotter commented 10 years ago

Is there a way to run kafka-web-console with a URL prefix? E.g. so that all urls and requests start with something like /kafka-web? This would allow us to proxy traffic to it from behind an https server that we use for restricting access into prod (we proxy to other web consoles under other URLs.)

Right now, requests are full-path, i.e.: link rel="stylesheet" media="screen" href="/assets/stylesheets/custom.css"

Thanks, Jeff

cjmamo commented 10 years ago

One way to solve this problem Jeff might be to use Apache HTTP server along with mod_rewrite to rewrite the URLs. More likely, you will want something like this: http://stackoverflow.com/questions/9994917/setting-a-custom-root-url-in-play-2-0. I'm about to commit a change to master that will prevent the links from breaking when you set application.context.

jpotter commented 10 years ago

Thanks, Claude. I downloaded head, did "play dist", and fired up that with "-Dapplication.context=/kafka/", and it works! Much appreciated.

(mod_rewrite wouldn't work because the HTML documents had references to absolute paths under "/assets")

-Jeff