clia-ntex-cors-mod

Crates.ioclia-ntex-cors-mod
lib.rsclia-ntex-cors-mod
version0.4.0
sourcesrc
created_at2022-06-28 07:13:54.683103
updated_at2023-07-03 13:26:04.097692
descriptionA mod to ntex-cors, not requiring an 'ORIGIN' header to produce CORS header.
homepagehttps://ntex.rs
repositoryhttps://github.com/clia-mod/ntex-extras.git
max_upload_size
id614667
size43,924
clia (clia)

documentation

https://docs.rs/clia-ntex-cors-mod/

README

A mod to ntex-cors

It doesn't require an 'ORIGIN' header to produce CORS header.

Version codecov

Documentation & community resources

A loose config example

ntex-cors = { package = "clia-ntex-cors-mod", version = "0.3" }
.wrap(
    Cors::new()
        .allowed_methods(vec![
            "GET", "HEAD", "POST", "OPTIONS", "PUT", "PATCH", "DELETE",
        ])
        .send_wildcard()
        .finish(),
)

Will produce CORS headers for every request:

vary: Origin
access-control-allow-origin: *

Build statuses

Platform Build Status
Linux build status
macOS build status
Windows build status
Commit count: 3218

cargo fmt