Merge branch 'zitadel:main' into main

This commit is contained in:
David Sharnoff 2022-10-24 14:24:22 -07:00 committed by GitHub
commit 87a37b219f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 36 additions and 19 deletions

View file

@ -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"
}