@@ -0,0 +1,2074 @@
+package de.passau.uni.sec.compose.id.rest.controller.cors;%0A%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0Aimport org.springframework.context.annotation.Bean;%0Aimport org.springframework.http.HttpHeaders;%0Aimport org.springframework.http.HttpStatus;%0Aimport org.springframework.http.ResponseEntity;%0Aimport org.springframework.util.MultiValueMap;%0Aimport org.springframework.web.bind.annotation.RequestBody;%0Aimport org.springframework.web.bind.annotation.RequestHeader;%0Aimport org.springframework.web.bind.annotation.RequestMapping;%0Aimport org.springframework.web.bind.annotation.RequestMethod;%0Aimport org.springframework.web.bind.annotation.RestController;%0Aimport org.springframework.web.servlet.DispatcherServlet;%0A%0A@RestController%0Apublic class CORSController %7B%0A%0A%09private static Logger LOG = LoggerFactory.getLogger(CORSController.class);%0A%09%0A%09// This is a global configuration that lets us implement our own OPTIONS request handles... the %22simpleCORSController%22 from spring didn't work...%0A%09@Bean%0A%09public DispatcherServlet dispatcherServlet() %7B%0A%09    DispatcherServlet servlet = new DispatcherServlet();%0A%09    servlet.setDispatchOptionsRequest(true);%0A%09    return servlet;%0A%09%7D%0A%09%0A    %0A    public CORSController() %7B%0A%0A%09%7D%0A    %0A   @RequestMapping(value=%22/**%22,method = RequestMethod.OPTIONS)%0A    public ResponseEntity%3CObject%3E greetingOP(@RequestHeader(required=false) MultiValueMap%3CString, String%3E head,%0A    %09%09@RequestBody(required=false) MultiValueMap%3CString, String%3E body ) %7B%0A    %09LOG.info(%22executing OPTIONS request for CORS%22);%0A  %09    HttpHeaders headers = new HttpHeaders();%0A        //This is located in the CORS filter%0A  %09    //headers.add(%22Access-Control-Allow-Origin%22, %22*%22);%0A        headers.add(%22Access-Control-Allow-Headers%22, %22Origin, X-Requested-With, Content-Type, Accept%22);%0A    %09headers.add(%22Access-Control-Allow-Methods%22, %22POST, GET, OPTIONS, DELETE%22);%0A    %09headers.add(%22Access-Control-Max-Age%22, %223600%22);%0A    %09headers.add(%22Access-Control-Allow-Headers%22, %22x-requested-with%22);%0A%09%09return new ResponseEntity%3CObject%3E(null, headers, HttpStatus.NO_CONTENT);%0A    %7D%0A    %0A    %0A%7D%0A

Add OPTIONS CONTROLLER Again