Answers for "@crossorigin spring boot"

1

spring cors

public WebMvcConfigurer corsConfigurer() {
		return new WebMvcConfigurer() {
			@Override
			public void addCorsMappings(CorsRegistry registry) {
				registry.addMapping("/greeting-javaconfig").allowedOrigins("http://localhost:9000");
			}
		};
	}Copy
Posted by: Guest on June-29-2020
0

@crossorigin spring allow all

http.cors().configurationSource(request -> new CorsConfiguration().applyPermitDefaultValues());


Try this one if you have at least Java 8:
Posted by: Guest on October-09-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language