Springboot 项目 frame-options deny禁止iframe调用

tech2022-12-16  103

ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry = httpSecurity .authorizeRequests(); //这里表示不需要权限校验 ignoreUrlsProperties.getUrls().forEach(url -> registry.antMatchers(url).permitAll()); httpSecurity // 由于使用的是JWT,我们这里不需要csrf .csrf().disable() .headers().frameOptions().disable() .and() .exceptionHandling() .authenticationEntryPoint(unauthorizedHandler) .accessDeniedHandler(customerRestAccessDeniedHandler).and()
最新回复(0)