diff --git a/bindings/wasm/output.go b/bindings/wasm/output.go index 98e3369442..934a3f0f88 100644 --- a/bindings/wasm/output.go +++ b/bindings/wasm/output.go @@ -89,6 +89,9 @@ func (out *outputBinding) Init(ctx context.Context, metadata bindings.Metadata) return fmt.Errorf("wasm: error instantiating host wasi functions: %w", err) } if _, found := imports[modeWasiHTTP]; found { + if out.meta.StrictSandbox { + return fmt.Errorf("can not instantiate wasi-http with strict sandbox") + } err = wasi_http.Instantiate(ctx, out.runtime) } if err != nil { diff --git a/bindings/wasm/testdata/http/Makefile b/bindings/wasm/testdata/http/Makefile new file mode 100644 index 0000000000..f82b0ebfd6 --- /dev/null +++ b/bindings/wasm/testdata/http/Makefile @@ -0,0 +1,4 @@ +default: main.wasm + +main.wasm: main.go + tinygo build -target wasi -o main.wasm main.go \ No newline at end of file diff --git a/bindings/wasm/testdata/http/main.wasm b/bindings/wasm/testdata/http/main.wasm old mode 100644 new mode 100755 index cd07742e83..7d65972dd5 Binary files a/bindings/wasm/testdata/http/main.wasm and b/bindings/wasm/testdata/http/main.wasm differ