#ntex #cors #web #header #origin #resources #produce

clia-ntex-cors-mod

A mod to ntex-cors, not requiring an 'ORIGIN' header to produce CORS header

3 releases (breaking)

0.4.0 Jul 3, 2023
0.3.0 Apr 8, 2023
0.2.0 Jun 28, 2022

#6 in #produce

MIT license

43KB
796 lines

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

Dependencies

~13–25MB
~462K SLoC