Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting Security Headers like X-Content-Type #641

Open
samism91 opened this issue Aug 18, 2021 · 1 comment
Open

Setting Security Headers like X-Content-Type #641

samism91 opened this issue Aug 18, 2021 · 1 comment

Comments

@samism91
Copy link

Setting Security Headers like X-Content-Type

I have set the headers in conf/web.xml in Tomcat 8.5.69 but it is not working so found out that we can do it with spring security as well.

Grails Version: 2.5.5
Spring Security Core Plugin: 2.0.0
Tomcat Version: 8.5.69

Can someone help?

@m4rc77
Copy link

m4rc77 commented Feb 3, 2023

@samism91 There must be some way to configure the security headers with grails-spring-security-plugin as it is possible with spring security directly (see: https://docs.spring.io/spring-security/site/docs/5.0.x/reference/html/headers.html) ....

but we could also not figure out how to do it ... therefore we just implemented a filter in grails that adds the security headers. Have a look at https://stackoverflow.com/questions/36781490/how-to-add-strict-transport-security-header-to-a-grails-application it's a complete example how to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants