Skip to content

Commit

Permalink
Merge pull request #20 from JohnTitor/cors
Browse files Browse the repository at this point in the history
Release `actix-cors` v0.3.0-alpha.1
  • Loading branch information
JohnTitor authored Mar 11, 2020
2 parents 51f5c32 + 8176d5e commit 62cf9ba
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
5 changes: 5 additions & 0 deletions actix-cors/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changes

## [0.3.0-alpha.1] - 2020-03-11

* Minimize `futures-*` dependencies
* Update `actix-web` dependency to 3.0.0-alpha.1

## [0.2.0] - 2019-12-20

* Release
Expand Down
6 changes: 3 additions & 3 deletions actix-cors/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "actix-cors"
version = "0.2.0"
version = "0.3.0-alpha.1"
authors = ["Nikolay Kim <[email protected]>"]
description = "Cross-origin resource sharing (CORS) for actix-web applications."
readme = "README.md"
Expand All @@ -16,10 +16,10 @@ name = "actix_cors"
path = "src/lib.rs"

[dependencies]
actix-web = "2.0.0"
actix-web = "3.0.0-alpha.1"
actix-service = "1.0.1"
derive_more = "0.99.2"
futures = "0.3.1"
futures-util = { version = "0.3.4", default-features = false }

[dev-dependencies]
actix-rt = "1.0.0"
8 changes: 3 additions & 5 deletions actix-cors/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ use actix_web::http::header::{self, HeaderName, HeaderValue};
use actix_web::http::{self, Error as HttpError, Method, StatusCode, Uri};
use actix_web::HttpResponse;
use derive_more::Display;
use futures::future::{ok, Either, FutureExt, LocalBoxFuture, Ready};
use futures_util::future::{ok, Either, FutureExt, LocalBoxFuture, Ready};

/// A set of errors that can occur during processing CORS
#[derive(Debug, Display)]
Expand Down Expand Up @@ -776,10 +776,8 @@ where
if let Some(origin) =
inner.access_control_allow_origin(res.request().head())
{
res.headers_mut().insert(
header::ACCESS_CONTROL_ALLOW_ORIGIN,
origin,
);
res.headers_mut()
.insert(header::ACCESS_CONTROL_ALLOW_ORIGIN, origin);
};

if let Some(ref expose) = inner.expose_hdrs {
Expand Down

0 comments on commit 62cf9ba

Please sign in to comment.