mirror of
https://github.com/alibaba/higress.git
synced 2026-04-21 20:17:29 +08:00
make the wasm-go lib easier to use (#58)
This commit is contained in:
@@ -31,7 +31,7 @@ func main() {
|
||||
type HelloWorldConfig struct {
|
||||
}
|
||||
|
||||
func onHttpRequestHeaders(ctx *wrapper.CommonHttpCtx[HelloWorldConfig], config HelloWorldConfig, needBody *bool, log wrapper.LogWrapper) types.Action {
|
||||
func onHttpRequestHeaders(ctx wrapper.HttpContext, config HelloWorldConfig, log wrapper.Log) types.Action {
|
||||
err := proxywasm.AddHttpRequestHeader("hello", "world")
|
||||
if err != nil {
|
||||
log.Critical("failed to set request header")
|
||||
|
||||
Reference in New Issue
Block a user