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 b80777a commit 0ba208cCopy full SHA for 0ba208c
gateway/src/main.rs
@@ -86,7 +86,13 @@ async fn main() -> std::io::Result<()> {
86
actix_cors::Cors::default()
87
};
88
89
+ let default_headers = actix_web::middleware::DefaultHeaders::new().add((
90
+ "Content-Security-Policy",
91
+ "default-src 'self'; connect-src 'self' https://icons.app.sbb.ch; frame-ancestors 'self'; form-action 'self'; img-src 'self' data:; font-src 'self' https://cdn.app.sbb.ch/fonts/ data:; style-src 'self' 'unsafe-inline';",
92
+ ));
93
+
94
let mut app = App::new()
95
+ .wrap(default_headers)
96
.wrap(cors)
97
.wrap(RequestTracing::new())
98
.wrap(Compress::default()) // enable compress
0 commit comments