diff --git a/Cargo.toml b/Cargo.toml index 56a42bf97..8531a93ac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" } diff --git a/actix-cors/Cargo.toml b/actix-cors/Cargo.toml index a62cc664d..98ed67a2a 100644 --- a/actix-cors/Cargo.toml +++ b/actix-cors/Cargo.toml @@ -4,13 +4,13 @@ version = "0.1.0" authors = ["Nikolay Kim "] 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" \ No newline at end of file diff --git a/src/app.rs b/src/app.rs index 4f8b283e1..897b36459 100644 --- a/src/app.rs +++ b/src/app.rs @@ -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()) /// ); /// } /// ``` diff --git a/src/middleware/mod.rs b/src/middleware/mod.rs index f0b90e773..c2001e00f 100644 --- a/src/middleware/mod.rs +++ b/src/middleware/mod.rs @@ -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;