Skip to content

Commit 99a7931

Browse files
committed
cargo fmt
1 parent d09f79c commit 99a7931

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/http.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,22 @@ pub fn token(token: String) -> Token {
9595
pub struct SecurityHeadersMiddleware;
9696

9797
impl Middleware for SecurityHeadersMiddleware {
98-
fn after(&self, _: &mut Request, mut res: Result<Response, Box<Error+Send>>)
99-
-> Result<Response, Box<Error+Send>> {
98+
fn after(
99+
&self,
100+
_: &mut Request,
101+
mut res: Result<Response, Box<Error + Send>>,
102+
) -> Result<Response, Box<Error + Send>> {
100103
if let Ok(ref mut response) = res {
101104
response.headers.insert(
102105
"Content-Security-Policy".into(),
103-
vec!["default-src 'self'; \
106+
vec![
107+
"default-src 'self'; \
104108
script-src 'self' https://www.google-analytics.com https://www.google.com; \
105109
style-src 'self' https://www.google.com; \
106110
img-src *; \
107-
object-src 'none'".into()],
111+
object-src 'none'"
112+
.into(),
113+
],
108114
);
109115
response.headers.insert(
110116
"X-Content-Type-Options".into(),

0 commit comments

Comments
 (0)