David Pedersen

Results 381 comments of David Pedersen

It is ultimately up to you but as a library developer I'd just copy/paste the code. It's not complicated so wouldn't you rather control your own API?

As you mention this is necessary because [`Codec` always returns binary data](https://github.com/davidpdrsn/axum-typed-websockets/blob/main/src/lib.rs#L371). I'm not sure optionally converting to a text message is the bytes happens to be valid utf-8 is...

> This means that axum-typed-websockets cannot be used as a drop-in replacement in order to get type-safety on the server-side, and requires updating the client side as well. That's a...

After further testing it doesn't seem to be related to tracing-appender. I still happens if you add a default layer: ```rust use tracing_subscriber::fmt::{self, Subscriber}; use tracing_subscriber::layer::SubscriberExt; fn main() { let...

I haven't had time to look at it yet :/ I'd say you're free to continue. You can always ship it in its own crate if we decide it's not...

> maybe the StripPrefix middleware and OriginalUri could be moved to tower_http and then tower_http can try to use the OriginalUri first and then fall back to the req.uri(). That...

> Maybe the best solution to be had is ServeDir getting a new knob where you can tell it that it's mounted at some non-root path? Yeah that might be...

`SpaRouter` was a thin wrapper around `ServeDir` so that would have been the same. It was removed because `ServeDir` had gotten easier to use so `SpaRouter` didn't bring much value.

I've been putting together a middleware in axum to fix this https://github.com/tokio-rs/axum/pull/2230. Not quite there yet but that's another possible solution.