influxdata / influx-cli

CLI for managing resources in InfluxDB v2
MIT License
61 stars 23 forks source link

Feature Request: Support specifying path prefix for InfluxDB URL #452

Open yoshigev opened 1 year ago

yoshigev commented 1 year ago

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

Fuseteam commented 11 months ago

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

jdeus commented 10 months ago

Any news?

tisonkun commented 3 months ago

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

tisonkun commented 3 months ago

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 commented 3 months ago

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