diff options
| author | AKP <tom@tdpain.net> | 2022-04-15 21:21:52 +0100 |
|---|---|---|
| committer | AKP <tom@tdpain.net> | 2022-04-15 21:23:02 +0100 |
| commit | 91d1d02616861b4ced4830bd4509d3bf3550a4ed (patch) | |
| tree | 454942f8dfa74da8fac95390ece72f97347da30d /walrss | |
| parent | 0cdd005135a4cda07ae81bf2fc03495d02c24122 (diff) | |
Fix logic to determine if secure cookies should be generated
When debug mode was enabled, it would fail to disable secure cookies.
This fixes that and simplifies the logic used to determine if secure cookies should be enabled.
Diffstat (limited to 'walrss')
| -rw-r--r-- | walrss/internal/state/state.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/walrss/internal/state/state.go b/walrss/internal/state/state.go index af1d153..3ea8288 100644 --- a/walrss/internal/state/state.go +++ b/walrss/internal/state/state.go @@ -75,9 +75,8 @@ func (cfg *Config) GetHTTPAddress() string { } func (cfg *Config) EnableSecureCookies() bool { - enableSecureCookies := true - if !cfg.Debug { - enableSecureCookies = !cfg.Platform.DisableSecureCookies + if cfg.Debug { + return false } - return enableSecureCookies + return !cfg.Platform.DisableSecureCookies } |
