hyperlane-plugin-negotiate 23.4.1

A response negotiation plugin for the Hyperlane framework, answering with the content coding the client accepts and with 304 Not Modified while a validator still matches.
Documentation

hyperlane-plugin-negotiate

Explicit Accept-Encoding Compression & Conditional 304 Negotiation Plugin

Crates.io Version Docs.rs CI Status Rust 2024 License: MIT

Workspace Overview · Plugin Catalog · API Docs


Overview

hyperlane-plugin-negotiate provides explicit response content-coding negotiation and conditional 304 Not Modified entity-tag middleware for hyperlane applications. It is opt-in and transparent (Status::Continue) when unconfigured.

Installation

cargo add hyperlane-plugin-negotiate

Usage

use hyperlane_plugin_negotiate::{CompressConfig, CompressMiddleware};

fn setup_negotiate() -> Result<(), String> {
    CompressMiddleware::init(CompressConfig::default())
}

Verification

cargo run -p hyperlane-cli -- fmt --check
cargo clippy -p hyperlane-plugin-negotiate --all-features --all-targets -- -D warnings
cargo test -p hyperlane-plugin-negotiate --all-features

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For inquiries, please contact the author at root@devhub.vip.