-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Closed
Copy link
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: documentationA documentation taskA documentation task
Milestone
Description
Rossen Stoyanchev opened SPR-11496 and commented
SockJS has a couple of iframe-based transports. Those transports fail when using the Spring Security Java config, which automatically adds the X-Frame-Options: DENY
response header (see documentation). Adding the following for example seems to work:
@EnableWebSecurity
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.headers().addHeaderWriter(
new XFrameOptionsHeaderWriter(
XFrameOptionsHeaderWriter.XFrameOptionsMode.SAMEORIGIN))
.and()
...
}
}
Affects: 4.0.2
Issue Links:
- Doc: SockJS not working in IE9 when Spring Security is enabled [SPR-11525] #16150 Doc: SockJS not working in IE9 when Spring Security is enabled ("is duplicated by")
- SEC-2501 Provide a simpler way to customize X-Frame-Options mode used by default in the Java config
Referenced from: commits 15188a8
vyach-vasiliev
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: documentationA documentation taskA documentation task