Security exceptions

Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
2
down vote
favorite
I'm trying to configure security exceptions to all JavaScript/CSS of my pages.
I need to login to access the JSP files, except the login page, but all pages needs your resources so the folders must be access-free.
.csrf().disable()
.authorizeRequests()
.antMatchers("/login*").anonymous()
.antMatchers("/bower_components/**").permitAll()
.antMatchers("/custom/**").permitAll()
.antMatchers("/plugins/**").permitAll()
.antMatchers("/dist/**").permitAll()
.anyRequest().authenticated()
.and()
.formLogin()
.loginPage("/loginPage")
.defaultSuccessUrl("/home", true)
.failureUrl("/loginPage?error=true")
.loginProcessingUrl("/login")
.usernameParameter("username")
.passwordParameter("password")
.and()
.logout()
.logoutSuccessUrl("/loginPage")
.invalidateHttpSession(true);
java spring-mvc
add a comment |Â
up vote
2
down vote
favorite
I'm trying to configure security exceptions to all JavaScript/CSS of my pages.
I need to login to access the JSP files, except the login page, but all pages needs your resources so the folders must be access-free.
.csrf().disable()
.authorizeRequests()
.antMatchers("/login*").anonymous()
.antMatchers("/bower_components/**").permitAll()
.antMatchers("/custom/**").permitAll()
.antMatchers("/plugins/**").permitAll()
.antMatchers("/dist/**").permitAll()
.anyRequest().authenticated()
.and()
.formLogin()
.loginPage("/loginPage")
.defaultSuccessUrl("/home", true)
.failureUrl("/loginPage?error=true")
.loginProcessingUrl("/login")
.usernameParameter("username")
.passwordParameter("password")
.and()
.logout()
.logoutSuccessUrl("/loginPage")
.invalidateHttpSession(true);
java spring-mvc
Hi Jamal. The text has lost its meaning / purpose when you removed thethe code seems uglypart of original question. I need to know if the code in question is as elegant as possible and without the original text the users may not know what I mean. Someone may flag asobscure...
â Magno C
May 3 at 1:17
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I'm trying to configure security exceptions to all JavaScript/CSS of my pages.
I need to login to access the JSP files, except the login page, but all pages needs your resources so the folders must be access-free.
.csrf().disable()
.authorizeRequests()
.antMatchers("/login*").anonymous()
.antMatchers("/bower_components/**").permitAll()
.antMatchers("/custom/**").permitAll()
.antMatchers("/plugins/**").permitAll()
.antMatchers("/dist/**").permitAll()
.anyRequest().authenticated()
.and()
.formLogin()
.loginPage("/loginPage")
.defaultSuccessUrl("/home", true)
.failureUrl("/loginPage?error=true")
.loginProcessingUrl("/login")
.usernameParameter("username")
.passwordParameter("password")
.and()
.logout()
.logoutSuccessUrl("/loginPage")
.invalidateHttpSession(true);
java spring-mvc
I'm trying to configure security exceptions to all JavaScript/CSS of my pages.
I need to login to access the JSP files, except the login page, but all pages needs your resources so the folders must be access-free.
.csrf().disable()
.authorizeRequests()
.antMatchers("/login*").anonymous()
.antMatchers("/bower_components/**").permitAll()
.antMatchers("/custom/**").permitAll()
.antMatchers("/plugins/**").permitAll()
.antMatchers("/dist/**").permitAll()
.anyRequest().authenticated()
.and()
.formLogin()
.loginPage("/loginPage")
.defaultSuccessUrl("/home", true)
.failureUrl("/loginPage?error=true")
.loginProcessingUrl("/login")
.usernameParameter("username")
.passwordParameter("password")
.and()
.logout()
.logoutSuccessUrl("/loginPage")
.invalidateHttpSession(true);
java spring-mvc
edited May 3 at 0:45
Jamalâ¦
30.1k11114225
30.1k11114225
asked May 2 at 14:15
Magno C
1115
1115
Hi Jamal. The text has lost its meaning / purpose when you removed thethe code seems uglypart of original question. I need to know if the code in question is as elegant as possible and without the original text the users may not know what I mean. Someone may flag asobscure...
â Magno C
May 3 at 1:17
add a comment |Â
Hi Jamal. The text has lost its meaning / purpose when you removed thethe code seems uglypart of original question. I need to know if the code in question is as elegant as possible and without the original text the users may not know what I mean. Someone may flag asobscure...
â Magno C
May 3 at 1:17
Hi Jamal. The text has lost its meaning / purpose when you removed the
the code seems ugly part of original question. I need to know if the code in question is as elegant as possible and without the original text the users may not know what I mean. Someone may flag as obscure...â Magno C
May 3 at 1:17
Hi Jamal. The text has lost its meaning / purpose when you removed the
the code seems ugly part of original question. I need to know if the code in question is as elegant as possible and without the original text the users may not know what I mean. Someone may flag as obscure...â Magno C
May 3 at 1:17
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f193467%2fsecurity-exceptions%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Hi Jamal. The text has lost its meaning / purpose when you removed the
the code seems uglypart of original question. I need to know if the code in question is as elegant as possible and without the original text the users may not know what I mean. Someone may flag asobscure...â Magno C
May 3 at 1:17