gpt4 book ai didi

google-app-engine - 谷歌应用引擎/啊/健康 "Method does not exist."

转载 作者:数据小太阳 更新时间:2023-10-29 03:12:28 28 4
gpt4 key购买 nike

对 projectname.appspot.com/_ah/health 的请求返回以下错误

{
"code": 5,
"message": "Method does not exist.",
"details": [
{
"@type": "type.googleapis.com/google.rpc.DebugInfo",
"stackEntries": [],
"detail": "service_control"
}
]
}

本地测试,效果很好。

缩写的 app.yaml:

runtime: go
env: flex
api_version: go1

app.go 主要功能:

func main() {

r := mux.NewRouter()

r.HandleFunc("/", handler)

r.HandleFunc("/_ah/health", healthCheckHandler)

http.Handle("/", r)

port := 8080
if portStr := os.Getenv("PORT"); portStr != "" {
port, _ = strconv.Atoi(portStr)
}
log.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", port), nil))
}

知道出了什么问题吗?

最佳答案

将此添加到开放 API

paths:
"/_ah/health":
get:
operationId: "OkStatus"
security: []
responses:
200:
description: "Ok message"

不允许通过 ESP 代理

关于google-app-engine - 谷歌应用引擎/啊/健康 "Method does not exist.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47738235/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com