From 86f903339a410d714b0a28a530e3006aaae8fc8d Mon Sep 17 00:00:00 2001 From: Lukas Zapletal Date: Thu, 14 Nov 2024 19:23:38 +0100 Subject: [PATCH] worker: parse ostree MTLS proxy early --- cmd/osbuild-worker/jobimpl-ostree-resolve.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/osbuild-worker/jobimpl-ostree-resolve.go b/cmd/osbuild-worker/jobimpl-ostree-resolve.go index aa29bbcbca..de7ad1e17a 100644 --- a/cmd/osbuild-worker/jobimpl-ostree-resolve.go +++ b/cmd/osbuild-worker/jobimpl-ostree-resolve.go @@ -81,7 +81,9 @@ func (impl *OSTreeResolveJobImpl) Run(job worker.Job) error { reqParams.URL = s.URL reqParams.Ref = s.Ref if match, err := impl.CompareBaseURL(s.URL); match && err == nil { - reqParams.Proxy = impl.RepositoryMTLSConfig.Proxy.String() + if impl.RepositoryMTLSConfig.Proxy != nil { + reqParams.Proxy = impl.RepositoryMTLSConfig.Proxy.String() + } reqParams.MTLS = &ostree.MTLS{ CA: impl.RepositoryMTLSConfig.CA, ClientCert: impl.RepositoryMTLSConfig.MTLSClientCert,