[package]
name = "http-security-headers"
version = "0.1.0"
edition = "2021"
rust-version = "1.75.0"
authors = ["Daniel Curtis <drc@danielryancurtis.com>"]
description = "Type-safe, framework-agnostic HTTP security headers with Tower middleware support"
license = "MIT OR Apache-2.0"
repository = "https://github.com/danielrcurtis/http-security-headers"
documentation = "https://docs.rs/http-security-headers"
keywords = ["security", "headers", "middleware", "http", "tower"]
categories = ["web-programming", "network-programming"]
readme = "README.md"
[features]
default = []
middleware = ["tower", "http", "http-body", "pin-project-lite"]
axum = ["middleware", "axum-core"]
actix = ["middleware", "actix-web", "futures-util"]
observability = ["tracing"]
metrics = ["metrics-rs", "observability"]
validation = ["regex"]
[dependencies]
thiserror = "2.0"
tower = { version = "0.5", optional = true }
http = { version = "1.3.1", optional = true }
http-body = { version = "1.0", optional = true }
pin-project-lite = { version = "0.2", optional = true }
axum-core = { version = "0.5.5", optional = true }
actix-web = { version = "4.5", optional = true }
futures-util = { version = "0.3", optional = true }
tracing = { version = "0.1", optional = true }
metrics-rs = { package = "metrics", version = "0.24", optional = true }
regex = { version = "1.10", optional = true }
[dev-dependencies]
tokio = { version = "1.40", features = ["full", "test-util"] }
axum = "0.8.6"
tower = "0.5"
http = "1.0"
http-body-util = "0.1"
bytes = "1.0"
hyper = { version = "1.0", features = ["full"] }
[profile.release]
lto = true
codegen-units = 1
opt-level = 3