Can Tomcat 7 be configured to insert Content-Security-Policy: frame-ancestors 'self'
HTTP header with every response, like it can insert other security related headers, for example X-Frame-Options
?
相关问题
- Angular RxJS mergeMap types
- “Zero out” sensitive String data in Swift
- Google Apps Script: testing doPost() with cURL
- How to instantiate Http service in main.ts manuall
- C#使用http访问网络,有办法用指定网卡访问网络嘛?
相关文章
- C#使用http访问网络,有办法用指定网卡访问网络嘛?
- Warning : HTML 1300 Navigation occured?
- Is a unicode user agent legal inside an HTTP heade
- git: retry if http request failed
- Security concerns about CORS
- How do I prevent SQL injection with ColdFusion
- Flutter - http.get fails on macos build target: Co
- C# HttpClient.SendAsync always returns 404 but URL
Once it cannot be achieved with Tomcat 7.x built in filters, you could try one of the following options:
Creating a filter in your application
If adding a filter to your application is an option, you could use the following code to add a header to every response:
Creating a custom valve in your Tomcat
Another option is a custom valve. Quoting the steps from this page:
Your valve implementation could be like: