Ignore:
Timestamp:
02/05/22 22:48:19 (3 years ago)
Author:
Petar Partaloski <ppartaloski@…>
Branches:
main
Children:
2efe93e
Parents:
5b447b0
Message:

Fixed and added a better front end, improved clarity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/wediscussmovies/project/configuration/SecurityConfig.java

    r5b447b0 rf25e8dd  
    55import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
    66import org.springframework.security.config.annotation.web.builders.HttpSecurity;
     7import org.springframework.security.config.annotation.web.builders.WebSecurity;
    78import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
    89
     
    1516    }
    1617
     18    @Override
     19    public void configure(WebSecurity web) throws Exception {
     20        web.ignoring().antMatchers("/*.jpg");
     21        web.ignoring().antMatchers("/*.png");
     22        web.ignoring().antMatchers("/*.css");
     23        web.ignoring().antMatchers("/*.js");
     24    }
    1725
    1826    @Override
     
    2129        http.csrf().disable()
    2230                .authorizeRequests()
    23                 .antMatchers("/movies","/actors","/directors","/discussions","/replies","/register","/genres").permitAll()
     31                .antMatchers("/movies","/movies/**/","/actors","/persons/**/","/directors","/discussions","/discussions/**/","/discussions/all/**/","/replies","/register","/genres").permitAll()
    2432                .anyRequest()
    2533                .authenticated()
Note: See TracChangeset for help on using the changeset viewer.