Skip to content

Commit

Permalink
create security config if it does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
oleewere committed Jan 17, 2019
1 parent 036990f commit 489a19c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion solr/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ func NewSolrClient(solrConfig *SolrConfig) (*SolrClient, error) {
},
}

securityConfig := solrConfig.SecurityConfig
var securityConfig SecurityConfig
if solrConfig.SecurityConfig == nil {
solrConfig.SecurityConfig = new(SecurityConfig)
}

if securityConfig.kerberosConfig != nil && len(securityConfig.kerberosConfig.keytab) != 0 {
securityConfig.kerberosEnabled = true
Expand Down

0 comments on commit 489a19c

Please sign in to comment.