Server's build
and build_unchecked
apply layers from the generated config object in a different order
#3605
Labels
breaking-change
This will require a breaking change
bug
Something isn't working
server
Rust server SDK
build()
returns:So the
.layer
s registered inconfig
will run in B position after routing.On the other hand,
build_unchecked()
returns:So the
.layer
s run in A position, before routing.The correct behavior is
build
's. We introduced the config object as a nice way to register middleware within routing; users can always register middleware in A position by wrapping the builtService
withtower::Layer
s as they'd do with any otherService
.When fixing this:
build
orbuild_unchecked
.The text was updated successfully, but these errors were encountered: