http-rs / http-rs/tide

not possible to remove standard middleware when using Server::with_state()

Open
#476 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
5.1k
Forks
329
PR merge metrics
No merged PRs in 30d

Description

In my case, I use `Server::with_state()`, which means I get the standard `LogMiddleware`.

However, I have a custom logging middleware to add more context for request logging (method, path, etc as structured arguments instead of a formatted string).

So I get doubled up log entries.

It feels like deciding to have state (DB pool in my case) and getting default middleware should be separate decisions, like `with_logging()`, `with_cookies()`?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.