influxdata/influxdb-php

Can't omit port if running influxdb behind reverse proxy

jrbecart opened this issue · 1 comments

I am looking to omit the port number as I am running influx with a reverse proxy.

With an empty port value I got: "https://myhost/influxdb:0" but I want "https://myhost/influxdb"

An easy fix in Client.php will be:

// the the base URI
if(empty($this->port))
  $this->baseURI = sprintf('%s://%s', $this->scheme, $this->host);
else
  $this->baseURI = sprintf('%s://%s:%d', $this->scheme, $this->host, $this->port);

Let me know if it's possible.
Regards,

Sorry this change is not needed, adding a / at the end seems to do the job:
https://myhost/influxdb/:0