From 487f2109e7bc5037141eac05b054f548a5e7c5bb Mon Sep 17 00:00:00 2001 From: Greg Meldrum Date: Fri, 11 Aug 2023 08:59:58 -0400 Subject: [PATCH] DATAGO-59780: Add CORS support to EMA REST Controllers (#110) --- .../scanManager/rest/DataCollectionFileControllerImpl.java | 2 ++ .../agent/scanManager/rest/DataImportControllerImpl.java | 2 ++ .../management/agent/scanManager/rest/EMAControllerImpl.java | 2 ++ .../management/agent/scanManager/rest/ScanControllerImpl.java | 2 ++ 4 files changed, 8 insertions(+) diff --git a/service/application/src/main/java/com/solace/maas/ep/event/management/agent/scanManager/rest/DataCollectionFileControllerImpl.java b/service/application/src/main/java/com/solace/maas/ep/event/management/agent/scanManager/rest/DataCollectionFileControllerImpl.java index 5d59934d..2e6a3c0f 100644 --- a/service/application/src/main/java/com/solace/maas/ep/event/management/agent/scanManager/rest/DataCollectionFileControllerImpl.java +++ b/service/application/src/main/java/com/solace/maas/ep/event/management/agent/scanManager/rest/DataCollectionFileControllerImpl.java @@ -12,9 +12,11 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.CrossOrigin; @Slf4j @Validated +@CrossOrigin @RestController @RequestMapping(RestEndpoint.DATA_COLLECTION_FILE_URL) public class DataCollectionFileControllerImpl { diff --git a/service/application/src/main/java/com/solace/maas/ep/event/management/agent/scanManager/rest/DataImportControllerImpl.java b/service/application/src/main/java/com/solace/maas/ep/event/management/agent/scanManager/rest/DataImportControllerImpl.java index ec77476c..b9d525fc 100644 --- a/service/application/src/main/java/com/solace/maas/ep/event/management/agent/scanManager/rest/DataImportControllerImpl.java +++ b/service/application/src/main/java/com/solace/maas/ep/event/management/agent/scanManager/rest/DataImportControllerImpl.java @@ -14,6 +14,7 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; @@ -26,6 +27,7 @@ @Slf4j @Validated +@CrossOrigin @RestController @RequestMapping(RestEndpoint.MESSAGING_SERVICE_URL) public class DataImportControllerImpl implements DataImportController { diff --git a/service/application/src/main/java/com/solace/maas/ep/event/management/agent/scanManager/rest/EMAControllerImpl.java b/service/application/src/main/java/com/solace/maas/ep/event/management/agent/scanManager/rest/EMAControllerImpl.java index 1337bbe5..cc59a33a 100644 --- a/service/application/src/main/java/com/solace/maas/ep/event/management/agent/scanManager/rest/EMAControllerImpl.java +++ b/service/application/src/main/java/com/solace/maas/ep/event/management/agent/scanManager/rest/EMAControllerImpl.java @@ -12,6 +12,7 @@ import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -23,6 +24,7 @@ @Slf4j @Validated +@CrossOrigin @RestController @RequestMapping(RestEndpoint.MESSAGING_SERVICE_URL) public class EMAControllerImpl implements EMAController { diff --git a/service/application/src/main/java/com/solace/maas/ep/event/management/agent/scanManager/rest/ScanControllerImpl.java b/service/application/src/main/java/com/solace/maas/ep/event/management/agent/scanManager/rest/ScanControllerImpl.java index e954855c..927fa989 100644 --- a/service/application/src/main/java/com/solace/maas/ep/event/management/agent/scanManager/rest/ScanControllerImpl.java +++ b/service/application/src/main/java/com/solace/maas/ep/event/management/agent/scanManager/rest/ScanControllerImpl.java @@ -10,6 +10,7 @@ import org.springframework.data.domain.Pageable; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; @@ -17,6 +18,7 @@ @Slf4j @Validated +@CrossOrigin @RestController @RequestMapping(RestEndpoint.SCAN_URL) public class ScanControllerImpl implements ScanController {