#rocket #cors

rocket_cors

Cross-origin resource sharing (CORS) for Rocket.rs applications

11 releases

0.5.2 Mar 18, 2020
0.5.1 Nov 13, 2019
0.5.0 May 27, 2019
0.5.0-beta-1 Mar 18, 2019
0.2.0 Jul 24, 2017

#56 in Web programming

Download history 977/week @ 2021-04-11 874/week @ 2021-04-18 959/week @ 2021-04-25 635/week @ 2021-05-02 907/week @ 2021-05-09 801/week @ 2021-05-16 842/week @ 2021-05-23 1142/week @ 2021-05-30 1064/week @ 2021-06-06 881/week @ 2021-06-13 654/week @ 2021-06-20 790/week @ 2021-06-27 909/week @ 2021-07-04 738/week @ 2021-07-11 783/week @ 2021-07-18 803/week @ 2021-07-25

4,342 downloads per month
Used in 12 crates (8 directly)

MIT/Apache

130KB
2K SLoC

rocket_cors

Build Status Repository Crates.io

Cross-origin resource sharing (CORS) for Rocket applications

Requirements

  • Nightly Rust
  • Rocket >= 0.4

If you are using Rocket 0.3, use the 0.3.0 version of this crate.

There is a minimum version of Rust nightly required. This is usually higher than whatever Rocket requires plus more if the dependent crates require other features.

Nightly Rust

Rocket requires nightly Rust. You should probably install Rust with rustup, then override the code directory to use nightly instead of stable. See installation instructions.

In particular, rocket_cors is currently targetted for the latest nightly. Older nightlies might work, but they are subject to the minimum that Rocket sets.

Installation

Add the following to Cargo.toml:

rocket_cors = "0.5.1"

To use the latest master branch, for example:

rocket_cors = { git = "https://github.com/lawliet89/rocket_cors", branch = "master" }

Reference

License

rocket_cors is licensed under either of the following, at your option:

Dependencies

~10MB
~239K SLoC