mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-03 18:08:13 +02:00
fix: allow pomerium to start without certs (#2555)
This commit is contained in:
parent
0e5041ff9c
commit
951d20ad52
2 changed files with 5 additions and 4 deletions
|
@ -681,8 +681,8 @@ func (o *Options) Validate() error {
|
|||
o.HTTPRedirectAddr = strings.Trim(o.HTTPRedirectAddr, `"'`)
|
||||
|
||||
if !o.InsecureServer && !hasCert && !o.AutocertOptions.Enable {
|
||||
return fmt.Errorf("config: server must be run with `autocert`, " +
|
||||
"`insecure_server` or manually provided certificates to start")
|
||||
log.Warn(ctx).Msg("neither `autocert`, " +
|
||||
"`insecure_server` or manually provided certificates were provided, server will be using a self-signed certificate")
|
||||
}
|
||||
|
||||
switch o.Provider {
|
||||
|
@ -1012,8 +1012,9 @@ func (o Options) indexCerts(ctx context.Context) certsIndex {
|
|||
cert, err := cryptutil.ParsePEMCertificateFromFile(c.CertFile)
|
||||
if err != nil {
|
||||
log.Error(ctx).Err(err).Str("file", c.CertFile).Msg("parsing local cert: skipped")
|
||||
} else {
|
||||
idx.addCert(cert)
|
||||
}
|
||||
idx.addCert(cert)
|
||||
}
|
||||
return idx
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue