@Override public void init(WebSecurity builder) throws Exception { if (this.server != null) { IgnoredRequestConfigurer ignoring = builder.ignoring(); // The ignores are not cumulative, so to prevent overwriting the defaults // we add them back. Set<String> ignored = new LinkedHashSet<String>(SpringBootWebSecurityConfiguration.getIgnored(this.security)); if (ignored.contains("none")) { ignored.remove("none"); } if (this.errorController != null) { ignored.add(normalizePath(this.errorController.getErrorPath())); } String[] paths = this.server.getPathsArray(ignored); RequestMatcher requestMatcher = this.management.getSecurity().isEnabled() ? null : LazyEndpointPathRequestMatcher.getRequestMatcher(this.contextResolver); if (!ObjectUtils.isEmpty(paths)) { List<RequestMatcher> matchers = new ArrayList<RequestMatcher>(); for (String pattern : paths) { matchers.add(new AntPathRequestMatcher(pattern, null)); } if (requestMatcher != null) { matchers.add(requestMatcher); } requestMatcher = new OrRequestMatcher(matchers); } if (requestMatcher != null) { ignoring.requestMatchers(requestMatcher); } } }
@Override public void configure(WebSecurity web) throws Exception { web.ignoring() .antMatchers("/js/**/*.{js}") .antMatchers("/css/**") .antMatchers("/img/**") .antMatchers("/images/**"); }
@Override public void configure(WebSecurity web) throws Exception { web.ignoring() .antMatchers("/scripts/**/*.{js,html}") .antMatchers("/bower_components/**") .antMatchers("/i18n/**") .antMatchers("/assets/**") .antMatchers("/swagger-ui/index.html") .antMatchers("/test/**"); }
@Override public void configure(WebSecurity web) throws Exception { // @formatter:off web.ignoring() .antMatchers("/bower_components/**") .antMatchers("/css/**") .antMatchers("/images/**") .antMatchers("/js/**"); // @formatter:on }
@Override public void init(WebSecurity builder) throws Exception { IgnoredRequestConfigurer ignoring = builder.ignoring(); List<String> ignored = getIgnored(this.security); if (this.errorController != null) { ignored.add(normalizePath(this.errorController.getErrorPath())); } String[] paths = this.server.getPathsArray(ignored); ignoring.antMatchers(paths); }
@Override public void configure(WebSecurity web) throws Exception { web.ignoring() .antMatchers(HttpMethod.OPTIONS, "/**") .antMatchers("/app/**/*.{js,html}") .antMatchers("/bower_components/**") .antMatchers("/i18n/**") .antMatchers("/content/**") .antMatchers("/swagger-ui/index.html") .antMatchers("/test/**"); }
/** Which routes should be ignored on dealing with authentication at all. */ @Override public void configure(WebSecurity web) throws Exception { web.ignoring() .antMatchers("/public/**") // all assets .and() .ignoring() .antMatchers("/auth/authenticate") // REST end-point for token creation .and() .ignoring() .antMatchers("/") // the index page serves as root for the AngularJS app ; }
@Override public void configure(final WebSecurity web) throws Exception { web.ignoring() .antMatchers( "/logo.png", "/favicon.ico", "/static-resources/**", "/asset/**", "/styles/**", "/css/**", "/js/**"); }
@Override public void configure(WebSecurity web) throws Exception { web.ignoring() .antMatchers("/scripts/**/*.{js,html}") .antMatchers("/bower_components/**") .antMatchers("/i18n/**") .antMatchers("/assets/**") .antMatchers("/swagger-ui/index.html") .antMatchers("/api/register") .antMatchers("/api/activate") .antMatchers("/api/account/reset_password/init") .antMatchers("/api/account/reset_password/finish") .antMatchers("/test/**"); }
@Override public void configure(WebSecurity web) { // @formatter:off web.ignoring().antMatchers("/img/**", "/webjars/bootstrap/**"); // @formatter:on }
@Override public void configure(final WebSecurity web) throws Exception { web.ignoring().antMatchers("/resources/**"); }
@Override public void configure(WebSecurity web) throws Exception { web.ignoring().antMatchers("/assets/**"); }
/** * Spring security filter chain In this case, tell SPring Security to ignore the resources * folder */ @Override public void configure(WebSecurity web) { web.ignoring().antMatchers("/resources/**"); }
@Override public void configure(WebSecurity web) throws Exception { web.ignoring().antMatchers("/lib/**", "/app/**"); // #3 }
/** {@inheritDoc} */ @Override public void configure(WebSecurity web) throws Exception { web.ignoring().antMatchers("/api/**").antMatchers("/oauth").antMatchers("/api-docs"); }