File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,11 @@ func UpsertServerSettings(s models.ServerSettings) error {
33
33
if s .ClientSecret == Mask () {
34
34
s .ClientSecret = currSettings .ClientSecret
35
35
}
36
+
37
+ if servercfg .DeployedByOperator () {
38
+ s .BasicAuth = true
39
+ }
40
+
36
41
data , err := json .Marshal (s )
37
42
if err != nil {
38
43
return err
@@ -317,6 +322,10 @@ func GetManageDNS() bool {
317
322
318
323
// IsBasicAuthEnabled - checks if basic auth has been configured to be turned off
319
324
func IsBasicAuthEnabled () bool {
325
+ if servercfg .DeployedByOperator () {
326
+ return true
327
+ }
328
+
320
329
return GetServerSettings ().BasicAuth
321
330
}
322
331
Original file line number Diff line number Diff line change @@ -721,6 +721,10 @@ func GetEmqxRestEndpoint() string {
721
721
722
722
// IsBasicAuthEnabled - checks if basic auth has been configured to be turned off
723
723
func IsBasicAuthEnabled () bool {
724
+ if DeployedByOperator () {
725
+ return true
726
+ }
727
+
724
728
var enabled = true //default
725
729
if os .Getenv ("BASIC_AUTH" ) != "" {
726
730
enabled = os .Getenv ("BASIC_AUTH" ) == "yes"
You can’t perform that action at this time.
0 commit comments