Skip to content

Commit

Permalink
Merge branch 'release/0.5.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
s3rius committed Jun 16, 2022
2 parents c7c5e2a + 0bbd5eb commit 0909f54
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rustus"
version = "0.5.1"
version = "0.5.2"
edition = "2021"
description = "TUS protocol implementation written in Rust."
keywords = [
Expand Down
17 changes: 16 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,22 @@ fn create_cors(origins: Vec<String>, additional_headers: Vec<String>) -> Cors {
"X-HTTP-Method-Override",
])
.allowed_headers(additional_headers.into_iter())
.expose_any_header();
.expose_headers(vec![
"Location",
"Tus-Version",
"Tus-Resumable",
"Tus-Max-Size",
"Tus-Extension",
"Tus-Checksum-Algorithm",
"Content-Type",
"Content-Length",
"Upload-Length",
"Upload-Metadata",
"Upload-Defer-Length",
"Upload-Concat",
"Upload-Offset",
])
.max_age(86400);

// We allow any origin by default if no origin is specified.
if origins.is_empty() {
Expand Down

0 comments on commit 0909f54

Please sign in to comment.