We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 93ad0d8 commit 3cba145Copy full SHA for 3cba145
src/http.rs
@@ -101,6 +101,11 @@ impl Middleware for SecurityHeadersMiddleware {
101
mut res: Result<Response, Box<Error + Send>>,
102
) -> Result<Response, Box<Error + Send>> {
103
if let Ok(ref mut response) = res {
104
+ // It would be better if we didn't have to have 'unsafe-eval' in the `script-src`
105
+ // policy, but google charts (used for the download graph on crate pages) uses `eval`
106
+ // to load scripts. Remove 'unsafe-eval' if google fixes the issue:
107
+ // https://github.com/google/google-visualization-issues/issues/1356
108
+ // or if we switch to a different graph generation library.
109
response.headers.insert(
110
"Content-Security-Policy".into(),
111
vec![
0 commit comments