coder-rust-tower-http

<skill_overview> Apply reusable HTTP middleware with tower-http safely

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "coder-rust-tower-http" with this command: npx skills add ozerohax/assistagents/ozerohax-assistagents-coder-rust-tower-http

<skill_overview> Apply reusable HTTP middleware with tower-http safely

Adding request/response tracing Configuring CORS Enabling compression or timeouts Propagating request IDs

tower-http GitHub tower-http Docs

</skill_overview> <layer_selection>

Enable only required tower-http features in Cargo.toml Prefer TraceLayer for request spans and latency Use CorsLayer for browser-facing APIs Use TimeoutLayer for external calls and slow handlers

</layer_selection>

Set request IDs early, propagate later Place tracing outside of compression for full visibility Keep security layers (CORS) near the edge

<request_ids>

Use SetRequestIdLayer + PropagateRequestIdLayer Use a consistent header name (X-Request-Id)

</request_ids>

Do not use permissive CORS in production Whitelist origins, methods, and headers explicitly Align allow_credentials with specific origins

Enable compression only for sizable responses Avoid compressing already compressed formats

<anti_patterns> Avoid CorsLayer::permissive in prod Avoid stacking multiple timeouts Avoid logging sensitive headers in TraceLayer </anti_patterns>

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

coder-csharp-aspnetcore-api

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

coder-csharp-error-handling

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

coder-rust-axum-api

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

coder-rust-async-concurrency

No summary provided by upstream source.

Repository SourceNeeds Review