Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: discard settings for external controller in profiles #330

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions core/src/main/golang/native/config/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
)

var processors = []processor{
patchExternalController,
patchOverride,
patchGeneral,
patchProfile,
Expand All @@ -28,6 +29,15 @@ var processors = []processor{

type processor func(cfg *config.RawConfig, profileDir string) error

func patchExternalController(cfg *config.RawConfig, _ string) error {
cfg.ExternalController = ""
cfg.ExternalControllerTLS = ""
cfg.ExternalControllerUnix = ""
cfg.Secret = ""

return nil
}

func patchOverride(cfg *config.RawConfig, _ string) error {
if err := json.NewDecoder(strings.NewReader(ReadOverride(OverrideSlotPersist))).Decode(cfg); err != nil {
log.Warnln("Apply persist override: %s", err.Error())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ data class ConfigurationOverride(
var ipv6: Boolean? = null,

@SerialName("external-controller")
var externalController: String? = "127.0.0.1:0",
var externalController: String? = null,

@SerialName("secret")
var secret: String? = null,
Expand Down