influx-cli icon indicating copy to clipboard operation
influx-cli copied to clipboard

Feature Request: Support specifying path prefix for InfluxDB URL

Open yoshigev opened this issue 2 years ago • 5 comments

I'm opening a feature request for feature that was already done on 1.8: https://github.com/influxdata/influxdb/issues/10294 It was done by @bthesorceror on https://github.com/influxdata/influxdb/pull/16599.

The idea is to allow specifying a sub-path on the URL, so the client could work when an HTTP reverse proxy is routing the requests based on the path. For example, using a URL: https://example.com/influxdb/.

Apparently, this support was removed on version 2, as the flags no longer exists.

Is it possible to support this?

Thanks, Yehoshua

yoshigev avatar Oct 23 '22 14:10 yoshigev

Seems related to https://github.com/influxdata/influxdb/issues/15721

Fuseteam avatar Jul 25 '23 22:07 Fuseteam

Any news?

jdeus avatar Aug 30 '23 15:08 jdeus

Even we change the apiConfig.Host = params.Host.Host to use whatever user passes in.

tisonkun avatar Mar 11 '24 19:03 tisonkun

But it related to some generated code logic. So I can hardly help. Basically we pass the "host" as "https://example.com/influxdb/" and the path part should be conveyed to the final client config and it should work.

tisonkun avatar Mar 11 '24 19:03 tisonkun

But I anyway made it. Here is a patch and I verify it locally.

tisonkun avatar Mar 11 '24 19:03 tisonkun