Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Extending WebSecurityConfigurerAdapter is not adding CSP header

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my Spring MVC (5.0.3) application I have added a class SecurityConfig which extends WebSecurityConfigurerAdapter as follows:



My expectation is after browsing http://localhost:2020/webapp/ I will see CSP header in browser's developer console (Network tab). But, nothing related to CSP is added into response header.

I have checked by by applying breaking point at line http.headers().contentSecurityPolicy("script-src 'self'"); and it's hitting one time during context loading.

What's wrong why CSP header is not getting added in response?
 
Don't touch me. And dont' touch this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic