|
|
@ -68,6 +68,9 @@ func osVersionLinux() string {
|
|
|
|
if inHerokuDyno() {
|
|
|
|
if inHerokuDyno() {
|
|
|
|
attrBuf.WriteString("; env=hr")
|
|
|
|
attrBuf.WriteString("; env=hr")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if inAzureAppService() {
|
|
|
|
|
|
|
|
attrBuf.WriteString("; env=az")
|
|
|
|
|
|
|
|
}
|
|
|
|
attr := attrBuf.String()
|
|
|
|
attr := attrBuf.String()
|
|
|
|
|
|
|
|
|
|
|
|
id := m["ID"]
|
|
|
|
id := m["ID"]
|
|
|
@ -138,6 +141,7 @@ func inAwsLambda() bool {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func inHerokuDyno() bool {
|
|
|
|
func inHerokuDyno() bool {
|
|
|
|
// https://devcenter.heroku.com/articles/dynos#local-environment-variables
|
|
|
|
// https://devcenter.heroku.com/articles/dynos#local-environment-variables
|
|
|
|
if os.Getenv("PORT") != "" && os.Getenv("DYNO") != "" {
|
|
|
|
if os.Getenv("PORT") != "" && os.Getenv("DYNO") != "" {
|
|
|
@ -145,3 +149,11 @@ func inHerokuDyno() bool {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func inAzureAppService() bool {
|
|
|
|
|
|
|
|
if os.Getenv("APPSVC_RUN_ZIP") != "" && os.Getenv("WEBSITE_STACK") != "" &&
|
|
|
|
|
|
|
|
os.Getenv("WEBSITE_AUTH_AUTO_AAD") != "" {
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return false
|
|
|
|
|
|
|
|
}
|
|
|
|