1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-23 15:51:06 +01:00

re-export identity and cors middleware

This commit is contained in:
Nikolay Kim 2019-06-15 21:47:06 +06:00
parent cd323f2ff1
commit d7ec241fd0
4 changed files with 26 additions and 17 deletions

View File

@ -43,7 +43,7 @@ members = [
]
[features]
default = ["brotli", "flate2-zlib", "client", "fail"]
default = ["brotli", "flate2-zlib", "client", "fail", "depracated"]
# http client
client = ["awc"]
@ -68,6 +68,9 @@ ssl = ["openssl", "actix-server/ssl", "awc/ssl"]
# rustls
rust-tls = ["rustls", "actix-server/rust-tls"]
# deprecated middlewares
depracated = ["actix-cors", "actix-identity"]
[dependencies]
actix-codec = "0.1.2"
actix-service = "0.4.0"
@ -81,13 +84,15 @@ actix-server-config = "0.1.1"
actix-threadpool = "0.1.1"
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"
derive_more = "0.14"
encoding = "0.2"
futures = "0.1.25"
hashbrown = "0.3.0"
hashbrown = "0.3.1"
log = "0.4"
mime = "0.3"
net2 = "0.2.33"
@ -104,10 +109,9 @@ openssl = { version="0.10", optional = true }
rustls = { version = "0.15", optional = true }
[dev-dependencies]
actix = { version = "0.8.3" }
actix-http = { version = "0.2.3", features=["ssl", "brotli", "flate2-zlib"] }
actix-http-test = { version = "0.2.0", features=["ssl"] }
actix-files = "0.1.1"
actix = { version = "0.8.3" }
rand = "0.6"
env_logger = "0.6"
serde_derive = "1.0"
@ -121,7 +125,7 @@ opt-level = 3
codegen-units = 1
[patch.crates-io]
actix-web = { path = "." }
# actix-web = { path = "." }
actix-http = { path = "actix-http" }
actix-http-test = { path = "test-server" }
actix-web-codegen = { path = "actix-web-codegen" }

View File

@ -4,13 +4,13 @@ version = "0.1.0"
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
description = "Cross-origin resource sharing (CORS) for Actix applications."
readme = "README.md"
keywords = ["http", "web", "framework", "async", "futures"]
keywords = ["web", "framework"]
homepage = "https://actix.rs"
repository = "https://github.com/actix/actix-web.git"
documentation = "https://docs.rs/actix-cors/"
license = "MIT/Apache-2.0"
edition = "2018"
workspace = ".."
#workspace = ".."
[lib]
name = "actix_cors"
@ -21,8 +21,3 @@ actix-web = "1.0.0"
actix-service = "0.4.0"
derive_more = "0.14.1"
futures = "0.1.25"
[dev-dependencies]
actix-rt = "0.2.2"
#actix-http = "0.2.3"
#bytes = "0.4"

View File

@ -225,7 +225,6 @@ where
/// It is also possible to use static files as default service.
///
/// ```rust
/// use actix_files::Files;
/// use actix_web::{web, App, HttpResponse};
///
/// fn main() {
@ -233,7 +232,7 @@ where
/// .service(
/// web::resource("/index.html").to(|| HttpResponse::Ok()))
/// .default_service(
/// Files::new("", "./static")
/// web::to(|| HttpResponse::NotFound())
/// );
/// }
/// ```

View File

@ -11,5 +11,16 @@ pub use self::defaultheaders::DefaultHeaders;
pub use self::logger::Logger;
pub use self::normalize::NormalizePath;
//
// use actix_cors as cors;
#[cfg(feature = "deprecated")]
#[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;