title: Spring Security Pages don't open in Iframe on Chrome
body: <p>I am using SpringBoot,springsecurity and jdk 1.8. When I am trying to open any secured thymleaf page in iframe on Chrome, then it is rediecting me to login page every time. It is working fine on firefox and IE. And When I try to open the same URL without iframe, it is working fine. I have already given much time to solve ,but could solve it. Below are my spring security conf file code. One more thing both domains are different.</p>
  
  <pre><code>@Override
      protected void configure(HttpSecurity http) throws Exception {
          http
                  .headers()
                  .frameOptions().disable()
                  .and()
                  .csrf().disable()/*disbaling csrf here*/
                  .authorizeRequests()
                  .antMatchers("/","/login","/css/**", "/js/**", "/fonts/**","/img/**").permitAll()/*do not use spring security on this path*/
                  .and()
                  .formLogin()
                  .successHandler(successHandler) /*after success login on web we are handling the success event*/
                  .permitAll()
                  .and()
                  .logout().logoutRequestMatcher(new AntPathRequestMatcher("/logout")).logoutSuccessUrl("/login/?logout") /*defining logout and login url here*/
                  .permitAll()
                   /*
                   * This is for authentication failure handling
                   * */
                   http.exceptionHandling().authenticationEntryPoint(authenticationEntryPoint)
                   /*Token based authentication we are handling here*/
                   http.addFilterBefore(new StatelessAuthenticationFilter(tokenAuthenticationService), BasicAuthenticationFilter.class);
                   http.addFilterAfter(new SameSiteFilter(), BasicAuthenticationFilter.class)
      }
  </code></pre>
  
  <p>Can anyone please help me on this?</p>