Skip to content

Commit 0557311

Browse files
committed
Fixed some Crossorigin issues in some environment setup.
1 parent 50c79c4 commit 0557311

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/com/ericsson/ei/frontend/BackEndInformationController.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import org.springframework.http.ResponseEntity;
2626
import org.springframework.stereotype.Controller;
2727
import org.springframework.ui.Model;
28+
import org.springframework.web.bind.annotation.CrossOrigin;
2829
import org.springframework.web.bind.annotation.RequestMapping;
2930
import org.springframework.web.bind.annotation.RequestMethod;
3031

@@ -38,13 +39,15 @@ public class BackEndInformationController {
3839
@Autowired
3940
private BackEndInfoirmationControllerUtils backEndInfoContUtils;
4041

42+
@CrossOrigin
4143
@RequestMapping(value = "/backend", method = RequestMethod.GET)
4244
public ResponseEntity<String> getInstances(Model model, HttpServletRequest request) {
4345
LOG.debug("Recieved request for instances.");
4446
ResponseEntity<String> response = backEndInfoContUtils.handleRequestForInstances(request);
4547
return response;
4648
}
4749

50+
@CrossOrigin
4851
@RequestMapping(value = "/backend", method = RequestMethod.PUT)
4952
public ResponseEntity<String> switchBackEndInstance(Model model, HttpServletRequest request) {
5053
LOG.debug("Recieved request to switch back end.");
@@ -53,13 +56,15 @@ public ResponseEntity<String> switchBackEndInstance(Model model, HttpServletRequ
5356

5457
}
5558

59+
@CrossOrigin
5660
@RequestMapping(value = "/backend", method = RequestMethod.DELETE)
5761
public ResponseEntity<String> deleteBackEndInstance(Model model, HttpServletRequest request) {
5862
LOG.debug("Recieved request to delete back end.");
5963
ResponseEntity<String> response = backEndInfoContUtils.handleRequestToDeleteBackEnd(request);
6064
return response;
6165
}
6266

67+
@CrossOrigin
6368
@RequestMapping(value = "/backend", method = RequestMethod.POST)
6469
public ResponseEntity<String> addInstanceInformation(Model model, HttpServletRequest request) {
6570
LOG.debug("Recieved request to add back end.");

0 commit comments

Comments
 (0)