org.springframework.security.config.annotation.web.builders.WebSecurity.httpFirewall()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(172)

本文整理了Java中org.springframework.security.config.annotation.web.builders.WebSecurity.httpFirewall()方法的一些代码示例,展示了WebSecurity.httpFirewall()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebSecurity.httpFirewall()方法的具体详情如下:
包路径:org.springframework.security.config.annotation.web.builders.WebSecurity
类名称:WebSecurity
方法名:httpFirewall

WebSecurity.httpFirewall介绍

[英]Allows customizing the HttpFirewall. The default is StrictHttpFirewall.
[中]允许自定义HttpFirewall。默认设置是StrictHttpFirewall。

代码示例

代码示例来源:origin: infiniteautomation/ma-core-public

@Override
public void configure(WebSecurity web) throws Exception {
  web.httpFirewall(httpFirewall);
}

代码示例来源:origin: infiniteautomation/ma-core-public

@Override
public void configure(WebSecurity web) throws Exception {
  web.httpFirewall(httpFirewall);
}

代码示例来源:origin: infiniteautomation/ma-core-public

@Override
public void configure(WebSecurity web) throws Exception {
  web.httpFirewall(httpFirewall);
}

代码示例来源:origin: apache/syncope

@Override
public void configure(final WebSecurity web) throws Exception {
  web.httpFirewall(allowUrlEncodedSlashHttpFirewall());
}

代码示例来源:origin: com.centit.framework/framework-config

@Override
public void configure(WebSecurity web) throws Exception {
  String ignoreUrl = StringUtils.deleteWhitespace(env.getProperty("security.ignore.url"));
  if(StringUtils.isNotBlank(ignoreUrl)){
    String[] ignoreUrls = ignoreUrl.split(",");
    for(int i = 0; i < ignoreUrls.length; i++){
      web.ignoring().antMatchers(ignoreUrls[i]);
    }
  }
  web.httpFirewall(httpFirewall());
}

代码示例来源:origin: Erudika/para

/**
 * Configures the unsecured public resources.
 *
 * @param web web sec object
 * @throws Exception ex
 */
@Override
public void configure(WebSecurity web) throws Exception {
  web.ignoring().requestMatchers(IgnoredRequestMatcher.INSTANCE);
  DefaultHttpFirewall firewall = new DefaultHttpFirewall();
  firewall.setAllowUrlEncodedSlash(true);
  web.httpFirewall(firewall);
  //web.debug(true);
}

代码示例来源:origin: com.erudika/para-server

/**
 * Configures the unsecured public resources.
 *
 * @param web web sec object
 * @throws Exception ex
 */
@Override
public void configure(WebSecurity web) throws Exception {
  web.ignoring().requestMatchers(IgnoredRequestMatcher.INSTANCE);
  DefaultHttpFirewall firewall = new DefaultHttpFirewall();
  firewall.setAllowUrlEncodedSlash(true);
  web.httpFirewall(firewall);
  //web.debug(true);
}

代码示例来源:origin: tmobile/pacbot

@Override
public void configure(WebSecurity web) throws Exception {
  web.httpFirewall(allowUrlEncodedSlashHttpFirewall());
  web.ignoring().antMatchers(AUTH_WHITELIST);
  web.ignoring().antMatchers(HttpMethod.OPTIONS, "/**");
}

代码示例来源:origin: tmobile/pacbot

@Override
public void configure(WebSecurity web) throws Exception {
  web.httpFirewall(allowUrlEncodedSlashHttpFirewall());
  web.ignoring().antMatchers(AUTH_WHITELIST);
  web.ignoring().antMatchers(HttpMethod.OPTIONS, "/**");
}

相关文章