add X-Content-Type-Options : nosniff header

This commit is contained in:
Zlatin Balevsky
2020-05-16 09:05:33 +01:00
parent 64c349ffa8
commit 8bbfbb530c

View File

@ -0,0 +1,16 @@
package com.muwire.mucats
import org.springframework.security.web.util.matcher.AntPathRequestMatcher
class NoSniffInterceptor {
NoSniffInterceptor() {
match(uri: "/**")
}
boolean before() {
header("X-Content-Type-Options","nosniff")
true
}
boolean after() { true }
}