mirror of
https://github.com/actix/actix-extras.git
synced 2025-07-02 20:54:31 +02:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@ -1,10 +1,19 @@
|
||||
# Changes
|
||||
|
||||
## Unreleased - 2022-xx-xx
|
||||
- Added optional scopes to the middleware enabling use of multiple Limiters by passing an `HashMap<Limiter>` to the Http server `app_data`
|
||||
- Update `redis` dependency to `0.22`.
|
||||
## Unreleased - 2023-xx-xx
|
||||
|
||||
## 0.4.0 - 2022-09-10
|
||||
- Added optional scopes to the middleware enabling use of multiple Limiters by passing an `HashMap<Limiter>` to the Http server `app_data`
|
||||
|
||||
## 0.5.1
|
||||
|
||||
- No significant changes since `0.5.0`.
|
||||
|
||||
## 0.5.0
|
||||
|
||||
- Update `redis` dependency to `0.23`.
|
||||
- Update `actix-session` dependency to `0.8`.
|
||||
|
||||
## 0.4.0
|
||||
|
||||
- Add `Builder::key_by` for setting a custom rate limit key function.
|
||||
- Implement `Default` for `RateLimiter`.
|
||||
@ -12,13 +21,13 @@
|
||||
- In the middleware errors from the count function are matched and respond with `INTERNAL_SERVER_ERROR` if it's an unexpected error, instead of the default `TOO_MANY_REQUESTS`.
|
||||
- Minimum supported Rust version (MSRV) is now 1.59 due to transitive `time` dependency.
|
||||
|
||||
## 0.3.0 - 2022-07-11
|
||||
## 0.3.0
|
||||
|
||||
- `Limiter::builder` now takes an `impl Into<String>`.
|
||||
- Removed lifetime from `Builder`.
|
||||
- Updated `actix-session` dependency to `0.7`.
|
||||
|
||||
## 0.2.0 - 2022-03-22
|
||||
## 0.2.0
|
||||
|
||||
- Update Actix Web dependency to v4 ecosystem.
|
||||
- Update Tokio dependencies to v1 ecosystem.
|
||||
@ -26,6 +35,6 @@
|
||||
- Rename `Builder::{finish => build}()`.
|
||||
- Exceeding the rate limit now returns a 429 Too Many Requests response.
|
||||
|
||||
## 0.1.4 - 2022-03-18
|
||||
## 0.1.4
|
||||
|
||||
- Adopted into @actix org from <https://github.com/0xmad/actix-limitation>.
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "actix-limitation"
|
||||
version = "0.4.0"
|
||||
version = "0.5.1"
|
||||
authors = [
|
||||
"0xmad <0xmad@users.noreply.github.com>",
|
||||
"Rob Ede <robjtede@icloud.com>",
|
||||
@ -9,9 +9,9 @@ description = "Rate limiter using a fixed window counter for arbitrary keys, bac
|
||||
keywords = ["actix-web", "rate-api", "rate-limit", "limitation"]
|
||||
categories = ["asynchronous", "web-programming"]
|
||||
repository = "https://github.com/actix/actix-extras.git"
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2018"
|
||||
rust-version = "1.60"
|
||||
license.workspace = true
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
@ -23,16 +23,16 @@ session = ["actix-session"]
|
||||
|
||||
[dependencies]
|
||||
actix-utils = "3"
|
||||
actix-web = { version = "4", features = ["cookies"] }
|
||||
actix-web = { version = "4", default-features = false, features = ["cookies"] }
|
||||
|
||||
chrono = "0.4"
|
||||
derive_more = "0.99.7"
|
||||
log = "0.4"
|
||||
redis = { version = "0.22", default-features = false, features = ["tokio-comp"] }
|
||||
redis = { version = "0.23", default-features = false, features = ["tokio-comp"] }
|
||||
time = "0.3"
|
||||
|
||||
# session
|
||||
actix-session = { version = "0.7", optional = true }
|
||||
actix-session = { version = "0.8", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
actix-web = "4"
|
||||
|
@ -4,16 +4,16 @@
|
||||
> Originally based on <https://github.com/fnichol/limitation>.
|
||||
|
||||
[](https://crates.io/crates/actix-limitation)
|
||||
[](https://docs.rs/actix-limitation/0.4.0)
|
||||
[](https://docs.rs/actix-limitation/0.5.1)
|
||||

|
||||
[](https://deps.rs/crate/actix-limitation/0.4.0)
|
||||
[](https://deps.rs/crate/actix-limitation/0.5.1)
|
||||
|
||||
## Examples
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
actix-web = "4"
|
||||
actix-limitation = "0.3"
|
||||
actix-limitation = "0.5"
|
||||
```
|
||||
|
||||
```rust
|
||||
|
Reference in New Issue
Block a user