mirror of
https://github.com/actix/actix-web.git
synced 2025-01-17 12:45:31 +00:00
re-export identity and cors middleware
This commit is contained in:
parent
cd323f2ff1
commit
d7ec241fd0
4 changed files with 26 additions and 17 deletions
16
Cargo.toml
16
Cargo.toml
|
@ -43,7 +43,7 @@ members = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["brotli", "flate2-zlib", "client", "fail"]
|
default = ["brotli", "flate2-zlib", "client", "fail", "depracated"]
|
||||||
|
|
||||||
# http client
|
# http client
|
||||||
client = ["awc"]
|
client = ["awc"]
|
||||||
|
@ -68,6 +68,9 @@ ssl = ["openssl", "actix-server/ssl", "awc/ssl"]
|
||||||
# rustls
|
# rustls
|
||||||
rust-tls = ["rustls", "actix-server/rust-tls"]
|
rust-tls = ["rustls", "actix-server/rust-tls"]
|
||||||
|
|
||||||
|
# deprecated middlewares
|
||||||
|
depracated = ["actix-cors", "actix-identity"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix-codec = "0.1.2"
|
actix-codec = "0.1.2"
|
||||||
actix-service = "0.4.0"
|
actix-service = "0.4.0"
|
||||||
|
@ -81,13 +84,15 @@ actix-server-config = "0.1.1"
|
||||||
actix-threadpool = "0.1.1"
|
actix-threadpool = "0.1.1"
|
||||||
awc = { version = "0.2.1", optional = true }
|
awc = { version = "0.2.1", optional = true }
|
||||||
|
|
||||||
# actix-cors = "0.1."{ path="./actix-cors" }
|
# deprecated middlewares
|
||||||
|
actix-cors = { version = "0.1.0", optional = true }
|
||||||
|
actix-identity = { version = "0.1.0", optional = true }
|
||||||
|
|
||||||
bytes = "0.4"
|
bytes = "0.4"
|
||||||
derive_more = "0.14"
|
derive_more = "0.14"
|
||||||
encoding = "0.2"
|
encoding = "0.2"
|
||||||
futures = "0.1.25"
|
futures = "0.1.25"
|
||||||
hashbrown = "0.3.0"
|
hashbrown = "0.3.1"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
mime = "0.3"
|
mime = "0.3"
|
||||||
net2 = "0.2.33"
|
net2 = "0.2.33"
|
||||||
|
@ -104,10 +109,9 @@ openssl = { version="0.10", optional = true }
|
||||||
rustls = { version = "0.15", optional = true }
|
rustls = { version = "0.15", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
actix = { version = "0.8.3" }
|
||||||
actix-http = { version = "0.2.3", features=["ssl", "brotli", "flate2-zlib"] }
|
actix-http = { version = "0.2.3", features=["ssl", "brotli", "flate2-zlib"] }
|
||||||
actix-http-test = { version = "0.2.0", features=["ssl"] }
|
actix-http-test = { version = "0.2.0", features=["ssl"] }
|
||||||
actix-files = "0.1.1"
|
|
||||||
actix = { version = "0.8.3" }
|
|
||||||
rand = "0.6"
|
rand = "0.6"
|
||||||
env_logger = "0.6"
|
env_logger = "0.6"
|
||||||
serde_derive = "1.0"
|
serde_derive = "1.0"
|
||||||
|
@ -121,7 +125,7 @@ opt-level = 3
|
||||||
codegen-units = 1
|
codegen-units = 1
|
||||||
|
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
actix-web = { path = "." }
|
# actix-web = { path = "." }
|
||||||
actix-http = { path = "actix-http" }
|
actix-http = { path = "actix-http" }
|
||||||
actix-http-test = { path = "test-server" }
|
actix-http-test = { path = "test-server" }
|
||||||
actix-web-codegen = { path = "actix-web-codegen" }
|
actix-web-codegen = { path = "actix-web-codegen" }
|
||||||
|
|
|
@ -4,13 +4,13 @@ version = "0.1.0"
|
||||||
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
||||||
description = "Cross-origin resource sharing (CORS) for Actix applications."
|
description = "Cross-origin resource sharing (CORS) for Actix applications."
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
keywords = ["http", "web", "framework", "async", "futures"]
|
keywords = ["web", "framework"]
|
||||||
homepage = "https://actix.rs"
|
homepage = "https://actix.rs"
|
||||||
repository = "https://github.com/actix/actix-web.git"
|
repository = "https://github.com/actix/actix-web.git"
|
||||||
documentation = "https://docs.rs/actix-cors/"
|
documentation = "https://docs.rs/actix-cors/"
|
||||||
license = "MIT/Apache-2.0"
|
license = "MIT/Apache-2.0"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
workspace = ".."
|
#workspace = ".."
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "actix_cors"
|
name = "actix_cors"
|
||||||
|
@ -21,8 +21,3 @@ actix-web = "1.0.0"
|
||||||
actix-service = "0.4.0"
|
actix-service = "0.4.0"
|
||||||
derive_more = "0.14.1"
|
derive_more = "0.14.1"
|
||||||
futures = "0.1.25"
|
futures = "0.1.25"
|
||||||
|
|
||||||
[dev-dependencies]
|
|
||||||
actix-rt = "0.2.2"
|
|
||||||
#actix-http = "0.2.3"
|
|
||||||
#bytes = "0.4"
|
|
|
@ -225,7 +225,6 @@ where
|
||||||
/// It is also possible to use static files as default service.
|
/// It is also possible to use static files as default service.
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// use actix_files::Files;
|
|
||||||
/// use actix_web::{web, App, HttpResponse};
|
/// use actix_web::{web, App, HttpResponse};
|
||||||
///
|
///
|
||||||
/// fn main() {
|
/// fn main() {
|
||||||
|
@ -233,7 +232,7 @@ where
|
||||||
/// .service(
|
/// .service(
|
||||||
/// web::resource("/index.html").to(|| HttpResponse::Ok()))
|
/// web::resource("/index.html").to(|| HttpResponse::Ok()))
|
||||||
/// .default_service(
|
/// .default_service(
|
||||||
/// Files::new("", "./static")
|
/// web::to(|| HttpResponse::NotFound())
|
||||||
/// );
|
/// );
|
||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
|
|
|
@ -11,5 +11,16 @@ pub use self::defaultheaders::DefaultHeaders;
|
||||||
pub use self::logger::Logger;
|
pub use self::logger::Logger;
|
||||||
pub use self::normalize::NormalizePath;
|
pub use self::normalize::NormalizePath;
|
||||||
|
|
||||||
//
|
#[cfg(feature = "deprecated")]
|
||||||
// use actix_cors as cors;
|
#[deprecated(
|
||||||
|
since = "1.0.1",
|
||||||
|
note = "please use `actix_cors` instead. support will be removed in actix-web 1.0.2"
|
||||||
|
)]
|
||||||
|
pub use actix_cors as cors;
|
||||||
|
|
||||||
|
#[cfg(feature = "deprecated")]
|
||||||
|
#[deprecated(
|
||||||
|
since = "1.0.1",
|
||||||
|
note = "please use `actix_identity` instead. support will be removed in actix-web 1.0.2"
|
||||||
|
)]
|
||||||
|
pub use actix_identity as identity;
|
||||||
|
|
Loading…
Reference in a new issue