chore: house cleaning of the caos name and update sec (#232)
* chore: house cleaning of the caos name and update sec * some typos * make fix non breakable * Update SECURITY.md Co-authored-by: Livio Spring <livio.a@gmail.com> * Update SECURITY.md Co-authored-by: Livio Spring <livio.a@gmail.com> Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
parent
4bc4bfffe8
commit
4ac692bfd8
4 changed files with 18 additions and 9 deletions
|
@ -8,7 +8,11 @@ import (
|
|||
"golang.org/x/text/language"
|
||||
)
|
||||
|
||||
const OidcDevMode = "CAOS_OIDC_DEV"
|
||||
const (
|
||||
OidcDevMode = "ZITADEL_OIDC_DEV"
|
||||
// deprecated: use OidcDevMode (ZITADEL_OIDC_DEV=true)
|
||||
devMode = "CAOS_OIDC_DEV"
|
||||
)
|
||||
|
||||
type Configuration interface {
|
||||
Issuer() string
|
||||
|
@ -63,7 +67,11 @@ func ValidateIssuer(issuer string) error {
|
|||
func devLocalAllowed(url *url.URL) bool {
|
||||
_, b := os.LookupEnv(OidcDevMode)
|
||||
if !b {
|
||||
return b
|
||||
// check the old / current env var as well
|
||||
_, b = os.LookupEnv(devMode)
|
||||
if !b {
|
||||
return b
|
||||
}
|
||||
}
|
||||
return url.Scheme == "http"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue