mirror of
https://github.com/alibaba/higress.git
synced 2026-06-09 04:37:31 +08:00
feat: Add statusCodeDetails info when returning response in Wasm plugins directly (#1116)
This commit is contained in:
@@ -35,6 +35,6 @@ func onHttpRequestHeaders(ctx HttpContext, config MyConfig, log Log) types.Actio
|
||||
log.Infof("alloc success, point address: %p", b)
|
||||
memstats := fmt.Sprintf(`{"Sys": %d,"HeapSys": %d,"HeapIdle": %d,"HeapInuse": %d,"HeapReleased": %d}`, m.Sys, m.HeapSys, m.HeapIdle, m.HeapInuse, m.HeapReleased)
|
||||
log.Info(memstats)
|
||||
proxywasm.SendHttpResponse(http.StatusOK, [][2]string{{"Content-Type", "application/json"}}, []byte(memstats), -1)
|
||||
_ = proxywasm.SendHttpResponseWithDetail(http.StatusOK, "gc-test", [][2]string{{"Content-Type", "application/json"}}, []byte(memstats), -1)
|
||||
return types.ActionContinue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user