Ignore:
Timestamp:
08/07/22 18:55:02 (2 years ago)
Author:
unknown <mlviktor23@…>
Branches:
main
Children:
6eba109
Parents:
3e98cea
Message:

created login page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • springapp/src/main/java/mk/profesori/springapp/Security/SecurityConfiguration.java

    r3e98cea r800779d  
    1010import org.springframework.security.crypto.password.PasswordEncoder;
    1111import org.springframework.security.web.SecurityFilterChain;
     12import org.springframework.web.servlet.config.annotation.CorsRegistry;
     13import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
    1214
    1315import lombok.RequiredArgsConstructor;
     
    3032
    3133    @Bean
     34    public WebMvcConfigurer corsConfigurer() {
     35        return new WebMvcConfigurer() {
     36            @Override
     37            public void addCorsMappings(CorsRegistry registry) {
     38                registry.addMapping("/**").allowedOrigins("http://192.168.0.17:3000", "http://192.168.0.24:3000");
     39            }
     40        };
     41    }
     42
     43    @Bean
    3244    protected SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
    3345        http
Note: See TracChangeset for help on using the changeset viewer.