try to fix cors
This commit is contained in:
@@ -10,6 +10,7 @@ import java.util.Optional;
|
||||
import java.util.Vector;
|
||||
|
||||
@RestController
|
||||
@CrossOrigin(origins = "*", allowedHeaders = "*")
|
||||
public class Routes {
|
||||
|
||||
@GetMapping("/posts/{longitude}/{latitude}")
|
||||
|
||||
@@ -13,16 +13,4 @@ public class SwaJodelApplication {
|
||||
SpringApplication.run(SwaJodelApplication.class, args);
|
||||
}
|
||||
|
||||
|
||||
@Bean
|
||||
public WebMvcConfigurer corsConfigurer() {
|
||||
return new WebMvcConfigurer() {
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/**").allowedOrigins("http://localhost:3000");
|
||||
registry.addMapping("/**").allowedOrigins("https://jodel.local.anxietyprime.de");
|
||||
registry.addMapping("/**").allowedOrigins("https://jodel.anxietyprime.de");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user