fix: influxdb server string support scheme prefix

This commit is contained in:
JimMoen 2022-09-19 16:53:15 +08:00
parent cc327629c3
commit 03495d8d36
1 changed files with 5 additions and 1 deletions

View File

@ -485,8 +485,12 @@ log_error_points(InstId, Errs) ->
%% ===================================================================
%% typereflt funcs
-spec to_server_raw(string()) ->
-spec to_server_raw(string() | binary()) ->
{string(), pos_integer()}.
to_server_raw(<<"http://", Server/binary>>) ->
emqx_connector_schema_lib:parse_server(Server, ?INFLUXDB_HOST_OPTIONS);
to_server_raw(<<"https://", Server/binary>>) ->
emqx_connector_schema_lib:parse_server(Server, ?INFLUXDB_HOST_OPTIONS);
to_server_raw(Server) ->
emqx_connector_schema_lib:parse_server(Server, ?INFLUXDB_HOST_OPTIONS).