feat(platform): expose amap server readiness
This commit is contained in:
@@ -52,12 +52,13 @@ func NewServer(cfg config.Config) http.Handler {
|
||||
}
|
||||
}
|
||||
api := platform.NewHandler(platform.NewServiceWithRuntime(store, platform.RuntimeInfo{
|
||||
RequestTimeoutMs: int(cfg.RequestTimeout / time.Millisecond),
|
||||
AMapWebJSConfigured: strings.TrimSpace(cfg.AMapWebJSKey) != "",
|
||||
AMapSecurityProxyEnabled: strings.TrimSpace(cfg.AMapSecurityCode) != "" && strings.TrimSpace(cfg.AMapServiceHost) != "",
|
||||
AMapSecurityCodeExposed: exposedAMapSecurityCode(cfg) != "",
|
||||
AMapSecurityServiceHost: strings.TrimSpace(cfg.AMapServiceHost),
|
||||
PlatformRelease: strings.TrimSpace(cfg.PlatformRelease),
|
||||
RequestTimeoutMs: int(cfg.RequestTimeout / time.Millisecond),
|
||||
AMapWebJSConfigured: strings.TrimSpace(cfg.AMapWebJSKey) != "",
|
||||
AMapAPIConfigured: strings.TrimSpace(cfg.AMapAPIKey) != "",
|
||||
AMapSecurityProxyEnabled: strings.TrimSpace(cfg.AMapSecurityCode) != "" && strings.TrimSpace(cfg.AMapServiceHost) != "",
|
||||
AMapSecurityCodeExposed: exposedAMapSecurityCode(cfg) != "",
|
||||
AMapSecurityServiceHost: strings.TrimSpace(cfg.AMapServiceHost),
|
||||
PlatformRelease: strings.TrimSpace(cfg.PlatformRelease),
|
||||
}))
|
||||
handler := static.Handler(cfg.StaticDir, api)
|
||||
handler = withAppConfig(handler, cfg)
|
||||
|
||||
Reference in New Issue
Block a user