title: Delete Method Cors issue in Rest Controller
body: <p>I have some Rest endpoints in my project which I call from a client application in another server. I have successfully disabled Cors using the <code>@CrossOrigin</code> annotation, and all the methods work fine except the Delete method which throws the following error on Chrome: </p>
  
  <p><code>XMLHttpRequest cannot load http://localhost:8856/robotpart/1291542214/compatibilities. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8888' is therefore not allowed access. The response had HTTP status code 403.</code></p>
  
  <p>Here is my controller: </p>
  
  <pre><code>@CrossOrigin(origins = "*")
  @ExposesResourceFor(RobotPart.class)
  public class RobotPartController {
  
        //All endpoints are working except the Delete Mapping
  
      @GetMapping("/robotpart")
      public ResponseEntity&lt;List&lt;RobotPartResource&gt;&gt; listAllParts() {
          //..
      }
  
      @GetMapping("/robotpart/{id}")
      public ResponseEntity&lt;RobotPartResource&gt; getById(@PathVariable Integer id) {
          //..
      }
  
  
      @GetMapping("/robotpart/{id}/compatibilities")
      public ResponseEntity&lt;Collection&lt;RobotPartResource&gt;&gt; getRobotCompatibilities(@PathVariable Integer id,
            //..
      }
  
  
      @PostMapping("/robotpart")
      public ResponseEntity&lt;RobotPartResource&gt; getById(@RequestBody @Valid RobotPart newRobot) {
          //..
  
      @PutMapping("/robotpart/{id}")
      public ResponseEntity&lt;RobotPartResource&gt; modify(@PathVariable Integer id, @Valid @RequestBody RobotPart newRobot) {
  
           //...
      }
  
      @DeleteMapping("/robotpart/{id}")
      public ResponseEntity&lt;RobotPart&gt; deleteById(@PathVariable Integer id) {
  
          //...
      }
  
      }
  </code></pre>
  
  <p>Any way around it? </p>