Allow insecure connections to Gitlab (#234)

This MR makes it possible to ignore bad x509 certificates when connecting to Gitlab, by creating a custom HTTP connection. The option is exposed via the setup function. This is a PATCH release.
This commit is contained in:
Harrison (Harry) Cramer
2024-04-02 21:53:25 -04:00
committed by GitHub
parent 670f08849f
commit 4f1fe4ae25
5 changed files with 45 additions and 15 deletions

View File

@@ -13,19 +13,16 @@ M.start = function(callback)
local port = state.settings.port or empty_port
local parsed_port = nil
local callback_called = false
local command = state.settings.bin
.. " "
.. state.settings.gitlab_url
.. " "
.. port
.. " "
.. state.settings.auth_token
.. " "
.. "'"
.. vim.json.encode(state.settings.debug)
.. "'"
.. " "
.. state.settings.log_path
local command = string.format(
"%s %s %s %s '%s' %s '%s'",
state.settings.bin,
state.settings.gitlab_url,
port,
state.settings.auth_token,
vim.json.encode(state.settings.debug),
state.settings.log_path,
vim.json.encode(state.settings.connection_settings)
)
local job_id = vim.fn.jobstart(command, {
on_stdout = function(_, data)