feat(web): Removed Cors impl and replaced with tower-http's CorsLayer (#1123)

Fix #1122, see the issue for more details.

Signed-off-by: slinkydeveloper <[email protected]>
This commit is contained in:
Francesco Guardiani
2022-10-31 13:56:36 -04:00
committed by GitHub
parent 40536dc134
commit a98d719fb4
9 changed files with 153 additions and 848 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
use super::{BoxBody, BoxError, Config, GrpcWeb};
use super::{BoxBody, BoxError, GrpcWebService};
use tower_layer::Layer;
use tower_service::Service;
@@ -23,9 +23,9 @@ where
S::Future: Send + 'static,
S::Error: Into<BoxError> + Send,
{
type Service = GrpcWeb<S>;
type Service = GrpcWebService<S>;
fn layer(&self, inner: S) -> Self::Service {
Config::default().enable(inner)
GrpcWebService::new(inner)
}
}