From dbeb6c7ff275008461c46877390c02145737ace4 Mon Sep 17 00:00:00 2001 From: Anthony Nguyen-Duong Date: Tue, 23 Jul 2019 23:48:36 -0400 Subject: [PATCH] add CORS for react frontend --- src/main/java/com/fydp/backend/controllers/AppController.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/fydp/backend/controllers/AppController.java b/src/main/java/com/fydp/backend/controllers/AppController.java index f597756..3b09c73 100644 --- a/src/main/java/com/fydp/backend/controllers/AppController.java +++ b/src/main/java/com/fydp/backend/controllers/AppController.java @@ -74,6 +74,7 @@ public List getSummaries() { return listener.getMessages(); } + @CrossOrigin(origins = "http://localhost:3000") @PostMapping(value = ("/upload"), headers = ("content-type=multipart/*")) public PdfInfo upload(@RequestParam("file") MultipartFile file) throws IOException { logger.debug("Upload endpoint hit");