influxdb
influxdb copied to clipboard
Add HTTP proxy base path/prefix configuration option for UI
Currently it's impossible to put influxdb UI behind reverse proxy in non-root location.
For example nginx configuration like this is not working
location /flux/ { proxy_pass http://127.0.0.1:8086/; }
Influxdb is always returning root-based URLs in responses eg. <script src="/a35d56ccdc.js">
and that breaks proxy passing.
Please add some config option like http-ui-base-path which "relocates" UI access base URL.
Expected behavior
If configuration option is set like http-ui-base-path: 'flux/'
.
- Influxdb returns UI content on request http://127.0.0.1:8086/flux/
- Probably redirects request '/' to '/flux/'
- Returns all paths un UI HTMLs prefixed wit this path eg.
<script src="/flux/a35d56ccdc.js">
This has popped up in a couple of other places as well...linked below for reference:
- Question asked on the InfluxDB community forums: https://community.influxdata.com/t/nginx-reverse-proxy-with-influxdb2/20689
- Feature request for a similar option in Kapacitor: https://github.com/influxdata/kapacitor/issues/2478
This seems to be a duplicate of https://github.com/influxdata/influxdb/issues/15721.
Is there any way to speed up such a basic feature? Is there any reason why this was not done properly in the first place?
+1
+1
@alexpaxton @121watts @carols10cents @otoolep @e-dard @jwilder @domodwyer @crepererum @alamb @jvshahid
There's no need to shout.
+1 We need the base URL to use an Nginx reverse proxy, just like OP