Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

spring cors allow all origins

HomeController.java
@CrossOrigin(origins = "*", allowedHeaders = "*")
@Controller
public class HomeController 
{
  @GetMapping(path="/")
  public String homeInit(Model model) {
    return "home";
  }
}
Source by howtodoinjava.com #
 
PREVIOUS NEXT
Tagged: #spring #cors #origins
ADD COMMENT
Topic
Name
6+8 =