Allow more ssl parameters and support empty value

This commit is contained in:
Abhay Kumar 2020-04-20 08:56:49 -07:00
parent 6b030006ab
commit a1a58cff66

View File

@ -198,8 +198,9 @@ connection_opts(_Args, {url, DatabaseUrl}) ->
[] -> {ok, ConnectionOpts};
QueryList ->
case proplists:get_value("ssl", QueryList) of
"true" -> {ok, maps:put(ssl, true, ConnectionOpts)};
_ -> {ok, ConnectionOpts}
undefined -> {ok, ConnectionOpts};
[] -> {ok, maps:put(ssl, true, ConnectionOpts)};
Value -> {ok, maps:put(ssl, list_to_atom(Value), ConnectionOpts)}
end
end
end