Skip to content

Commit

Permalink
removed an unnecessary cors configuration bean
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiDittmer committed Nov 23, 2023
1 parent 24f3123 commit 2bcbacd
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/main/java/org/tb/common/configuration/WebMvcConfiguration.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
package org.tb.common.configuration;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.lang.NonNull;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.web.servlet.resource.ContentVersionStrategy;
import org.springframework.web.servlet.resource.VersionResourceResolver;
Expand All @@ -32,13 +28,4 @@ public void addResourceHandlers(ResourceHandlerRegistry registry) {

}

@Bean
public WebMvcConfigurer corsConfigurer() {
return new WebMvcConfigurer() {
@Override
public void addCorsMappings(@NonNull CorsRegistry registry) {
registry.addMapping("/**").allowedOrigins("localhost,localhost:8080,localhost:4200,orange-pebble-048f4f103.4.azurestaticapps.net").allowedHeaders("*").allowCredentials(true);
}
};
}
}

0 comments on commit 2bcbacd

Please sign in to comment.