Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 4 additions & 16 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,22 +75,10 @@ async fn main() -> Result<(), Error>{
["x-grpc-web", "content-type", "x-user-agent", "grpc-timeout", "authorization"];

let cors = CorsLayer::new()
.allow_origin(origins)
.expose_headers(
DEFAULT_EXPOSED_HEADERS
.iter()
.cloned()
.map(HeaderName::from_static)
.collect::<Vec<HeaderName>>(),
)
.allow_headers(
DEFAULT_ALLOW_HEADERS
.iter()
.cloned()
.map(HeaderName::from_static)
.collect::<Vec<HeaderName>>(),
)
.allow_methods(Any);
.allow_origin(Any) // Allow all origins for local development
.allow_headers(Any) // Allow all headers
.allow_methods(Any) // Allow all methods
.expose_headers(Any); // Expose all headers


let test_api = Test2Api {};
Expand Down
Loading