Registry / web-framework / tower-http

tower-http

JSON →
library0.7.0rscratesunverified

Tower middleware and utilities for HTTP clients and servers.

# Cargo.toml [dependencies] tower-http = "0.7.0"
INSTALL
IMPORT
SIG · TOWER-HTTP
T
tower-http
web-frameworkrustv0.7.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CorsLayer
use tower_http::cors::CorsLayer;

Adds a permissive CORS layer to an Axum router.

use tower_http::cors::CorsLayer; use axum::Router; let app = Router::new().layer(CorsLayer::permissive()); // Run with axum::Server
Debug
Known issues
gotchaRequires feature flags for specific middleware (e.g., "cors", "compression").
fix
Enable the needed feature in Cargo.toml: tower-http = { version = "0.7", features = ["cors"] }
affects: >=0.1.0
Upgrade
Version history
0.7.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
OpenAI (training)
1
Resources
tower-http — cargo add tower-http · libregistry