Git Product home page Git Product logo

Comments (5)

jcchavezs avatar jcchavezs commented on July 23, 2024

AFAIR direct response is actually a filter and hence it avoids the filterchain (hence any other filter). We faced something like that (I think context can be found in corazawaf/coraza-proxy-wasm#172) so I am not sure this is a bug.

from proxy-wasm-go-sdk.

petedmarsh avatar petedmarsh commented on July 23, 2024

Ah! Ok, then is there somewhere we can document this behaviour? Thankfully for me it's not something that I actually need but it did make me very confused when I was extending one of the examples which use direct_response

from proxy-wasm-go-sdk.

mathetake avatar mathetake commented on July 23, 2024

not the issue/bug/documentation matter of this SDK, but it's an expected behavior of Envoy, so closing.

from proxy-wasm-go-sdk.

petedmarsh avatar petedmarsh commented on July 23, 2024

@mathetake I'm not quite sure why this is expected behaviour as OnHttpRequestHeaders is called and this is using a direct response route action rather than a direct response network filter:

https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#envoy-v3-api-msg-config-route-v3-directresponseaction
https://www.envoyproxy.io/docs/envoy/latest/configuration/listeners/network_filters/direct_response_filter

It would make more sense to me if OnHttpRequestHeaders was not called too.

The logs from my example linked above:

[2023-11-06 22:23:37.315][123297][info][wasm] [source/extensions/common/wasm/context.cc:1171] wasm log: OnHttpRequestHeaders
[2023-11-06 22:23:37.315][123297][info][wasm] [source/extensions/common/wasm/context.cc:1171] wasm log: OnHttpResponseHeaders
[2023-11-06 22:23:37.315][123297][info][wasm] [source/extensions/common/wasm/context.cc:1171] wasm log: OnHttpResponseBody

from proxy-wasm-go-sdk.

mathetake avatar mathetake commented on July 23, 2024

As I said this is the known behavior of Envoy, nothing to do with SDK.

from proxy-wasm-go-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.