Commit Graph

74 Commits

Author SHA1 Message Date
Yong Wen Chua 9cb16ba01d
Use request local cache for fairing implementation (#50) 2018-11-01 14:44:28 +08:00
Yong Wen Chua 21444e90c4
Update README 2018-11-01 09:21:50 +08:00
Yong Wen Chua a0d31cf498
Bump to Rocket 0.4.0-rc.1 (#49) 2018-11-01 09:20:24 +08:00
Yong Wen Chua d993082991
docs.rs now builds nightly docs properly 🎉 2018-10-31 10:59:52 +08:00
Yong Wen Chua b80c1939d4
Remove `macro_use` on `extern crate` (#47)
* Remove macro_use from examples

* Remove macro_use from log and rocket

* Remove macro_use for serde_derive

* Remove from examples

* Fix no-default features build failure
2018-10-31 10:59:01 +08:00
Yong Wen Chua 086f018bb9
cargo fix --edition 2018-10-31 10:31:16 +08:00
Yong Wen Chua 4dda14373a
cargo fmt 2018-10-31 10:30:10 +08:00
Eric Dattore 0b73773692 Update library to 0.4 and support Rocket 0.4 (#46)
* Update Cargo.toml for Rocket `master`

* Prepare library for Rocket 0.4

TODO: check line 62 in `fairing.rs` to find better way than unwrapping

* Bump minimum nightly for Rocket 0.4
2018-10-31 10:25:10 +08:00
Yong Wen Chua 351f0f945f
Bump Rocket and minimum Rust version (#45) 2018-09-17 09:46:50 +08:00
Tal Garfinkel f4858e1029 Fix various warnings generated by build: (#43)
-removed conservative_impl_trait as it is no longer needed with the current compiler.
-removed allow(unmounted_route) as rocket no longer provides this linter.
2018-07-19 10:03:03 +08:00
Yong Wen Chua e11e973da8 Update Cargo.toml with dual license 2018-07-18 14:39:28 +08:00
Yong Wen Chua 096930ebfa v0.3.0 Release 2018-07-18 13:34:21 +08:00
Yong Wen Chua b133d19465 Bump minimum Rocket version 2018-07-18 13:31:11 +08:00
Yong Wen Chua e45b618c4f Fix copy paste embarassing mistake 2018-07-18 13:30:54 +08:00
Yong Wen Chua 8654330176 Switch to MIT and Apache Dual License
Fixes #41
2018-07-18 13:29:02 +08:00
Yong Wen Chua 7954d9d078
Cargo fmt (#42) 2018-07-18 13:26:33 +08:00
Yong Wen Chua 4db0969584
Bump Rocket, Rust version and remove impl trait flag (#40)
* Bump Rocket, Rust version and remove impl trait flag

* Seems to build now

* Ignore Rocket documentation errors

* Update travis script

* Increase nightly version by a day

* Bump again
2018-07-18 13:07:31 +08:00
Heinmci 27a0ef73f1 fixed rocket_cors version in readme (#39) 2018-07-16 09:28:47 +08:00
Yong Wen Chua f66f31ad99 Stable is 0.2.3 2018-02-14 16:39:12 +08:00
Yong Wen Chua bfaab9872e Fix Unicode Serialization of Access-Control-Allow-Origin 2018-02-14 16:27:50 +08:00
Yong Wen Chua 4396310913 Adjoin `Vary` header in response
Instead of removing/overwriting
2018-02-14 15:50:39 +08:00
Yong Wen Chua b71f7a2243 Bump to development 0.3
And link to manually maintained stable docs for now
2018-02-14 15:19:51 +08:00
Yong Wen Chua ec04e27a89
Configure the rank of the injected Fairing error handling route (#36)
* Add option to change the rank of the injected Fairing error handling route

* Document the route
2018-02-14 14:21:50 +08:00
Yong Wen Chua 561cc86af5 Use intra rustdoc links
See https://github.com/rust-lang/rust/issues/43466
2018-02-14 13:49:10 +08:00
Yong Wen Chua 39eb59e466 Address ICE related to impl trait
Original bug: https://github.com/rust-lang/rust/issues/43380

Fixes #33
2018-02-14 13:37:48 +08:00
Yong Wen Chua ff1deabf55 Rustfmt fix
- Bump to 0.2.2
 - Add Travis cargo cache
2018-02-14 13:22:43 +08:00
Yong Wen Chua 456248eabf
Bump rocket to 0.3.6 (#34)
* Bump rocket to 0.3.6

- Remove `build.rs` - the minimum nightly version is enforced by Rocket
- Remove the pinning to a specific Nightly version. The latest nightly
should work.
- Added a minimum nightly matrix

* Fix Rocket's minimum

* Fix travis build script
2018-02-14 13:20:31 +08:00
Yong Wen Chua 34e3af4869 Bump nightly version as per Rocket 0.3.5 2018-01-08 09:56:02 +08:00
Yong Wen Chua c99083af5d v0.2.1
- Bumped nightly requirement to at least `nightly-2017-09-26`
- `serde` is now gated behind a feature flag, enabled by default
- Some small cleanup changes
2017-11-06 15:31:05 +08:00
Yong Wen Chua 44211b27d8 Use `pub(crate)` visibility for internal Response 2017-11-06 10:57:25 +08:00
Allan Simon cc871967df update fairing.rs removed duplicate condition (#27)
the method == option check was present twice for apparently no reason (typo?)
2017-10-31 11:00:14 +08:00
Yong Wen Chua 5c0bb10b2d
Bump nightly version (#28) 2017-10-31 10:46:25 +08:00
Yong Wen Chua 9782a47456 Add "mix" mode example (#26)
* Add "mix" mode example

* Fix typo
2017-09-05 14:59:51 +08:00
Yong Wen Chua 715913a6b3 Gate serde behind a feature flag (#25)
* Gate serde behind a feature flag

Fixes #16

* Fix travis build configuration
2017-09-05 14:11:28 +08:00
Yong Wen Chua 1ac3bedc96 Bump min Rust version 2017-09-05 13:19:22 +08:00
Yong Wen Chua ede4b1a222 Cargo clippy fixes 2017-07-26 14:37:02 +08:00
Yong Wen Chua 198190fb08 v0.2.0
- "Truly manual" mode is added (#22)
- Fairing's `on_response` will now log to info whenever it turns a missing OPTIONS
into a CORS preflight response (8eb782a7ca)
- Add a "catch all" OPTIONS route to automatically respond to preflight OPTIONS
check from the `Cors` in Rocket's managed state (#24)
- Bump minimum supported Rust nightly
2017-07-24 16:06:11 +08:00
Yong Wen Chua 36ec852a78 Add catch-all OPTIONS route and update examples/tests (#24) 2017-07-24 15:45:53 +08:00
Yong Wen Chua 8eb782a7ca Log to info when Fairing's `on_response` changes
the status code of a 404 OPTIONS

Fixes #20
2017-07-24 13:55:35 +08:00
Yong Wen Chua 92d7775b93 "Truly manual" API (#22)
* Experimental "truly manual" API

* Add API for general usage

* Add documentation and example

Change Fn to FnOnce to allow for moving and consuming
2017-07-24 13:11:10 +08:00
Yong Wen Chua 7d26aeb795 Bump nightly 2017-07-21 14:23:21 +08:00
Yong Wen Chua 0163ff6a26 Fix bug where Access-Control-Allow-Origin included a trailing `/`
Which broke all browsers
2017-07-19 16:26:44 +08:00
Yong Wen Chua 87e4145493 Redirect AllOrSome<HashSet<Url>>::new_from_str_list 2017-07-19 12:33:02 +08:00
Yong Wen Chua a5f54c72cf v0.1.3 2017-07-19 12:28:33 +08:00
Yong Wen Chua 0a94dfe22a Add Convenience typedefs and functions (#19)
* Add JSON documentation and convenience AllowedOrigin

* Add `AllowedHeaders`

* Add AllowedHeaders

* Fix tests
2017-07-19 12:25:56 +08:00
Yong Wen Chua fcd83e8fb5 Fix an issue where Fairing on_response will inject CORS headers into failed CORS requests 2017-07-19 09:52:30 +08:00
Yong Wen Chua 539157e0f0 Update Docs link and bump to 0.1.1
docs.rs cannot build nightly documentation
2017-07-18 18:27:24 +08:00
Yong Wen Chua 8fc8fef3eb Add documentation (#15)
* Add documentation for Fairing

* Add Guard example and documentation
2017-07-18 18:22:20 +08:00
Yong Wen Chua 35e9665628 Add remaining missing unit tests (#12) 2017-07-18 13:11:30 +08:00
Yong Wen Chua 6389f6d1c6 Merge pull request #10 from lawliet89/fairing-without-serde
Refactor Fairing and investigate performance improvement
2017-07-18 09:31:40 +08:00