Refused to display 'url' in a frame because it set 'X-Frame-Options' to 'deny'.

說明:前端使用layui。tab嵌套iframe,在加入security之前並無異常。 springmvc 在整合spring security時,瀏覽器發送請求,出現 解決:在繼承WebSecurityConfigurerAdapter的子類的覆蓋方法configure(HttpSecurity)裏面添加: http.headers().frameOptions().sameOrigin();
相關文章
相關標籤/搜索