We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93e9de4 commit 4f0df7cCopy full SHA for 4f0df7c
src/http.rs
@@ -25,7 +25,14 @@ impl SecurityHeadersMiddleware {
25
headers.insert("X-XSS-Protection".into(), vec!["1; mode=block".into()]);
26
27
let s3_host = match *uploader {
28
- Uploader::S3 { ref bucket, .. } => bucket.host(),
+ Uploader::S3 {
29
+ ref bucket,
30
+ ref cdn,
31
+ ..
32
+ } => match *cdn {
33
+ Some(ref s) => s.clone(),
34
+ None => bucket.host(),
35
+ },
36
_ => unreachable!(
37
"This middleware should only be used in the production environment, \
38
which should also require an S3 uploader, QED"
0 commit comments