mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
hostinfo: detect when running in Azure App Service.
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
This commit is contained in:
parent
3ab587abe7
commit
4b71291cdb
@ -68,6 +68,9 @@ func osVersionLinux() string {
|
||||
if inHerokuDyno() {
|
||||
attrBuf.WriteString("; env=hr")
|
||||
}
|
||||
if inAzureAppService() {
|
||||
attrBuf.WriteString("; env=az")
|
||||
}
|
||||
attr := attrBuf.String()
|
||||
|
||||
id := m["ID"]
|
||||
@ -138,6 +141,7 @@ func inAwsLambda() bool {
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func inHerokuDyno() bool {
|
||||
// https://devcenter.heroku.com/articles/dynos#local-environment-variables
|
||||
if os.Getenv("PORT") != "" && os.Getenv("DYNO") != "" {
|
||||
@ -145,3 +149,11 @@ func inHerokuDyno() bool {
|
||||
}
|
||||
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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user