Skip to content

Commit

Permalink
added more CORS
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonynd committed Jul 24, 2019
1 parent dbeb6c7 commit ad2befa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/fydp/backend/controllers/AppController.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public String welcome() {
return "index";
}

@CrossOrigin(origins = "http://localhost:3000")
@GetMapping(value = ("/summaries"))
public List<String> getSummaries() {
logger.info("GET summary endpoint hit");
Expand Down Expand Up @@ -130,6 +131,7 @@ public PdfInfo upload(@RequestParam("file") MultipartFile file) throws IOExcepti
return pdfInfo;
}

@CrossOrigin(origins = "http://localhost:3000")
@PostMapping(value = "/upload/chapters", consumes = {MediaType.APPLICATION_JSON_VALUE})
public ChapterTextModel parseChapters(@RequestBody PdfInfo response) throws IOException {
List<String> chapters = response.getChapters();
Expand Down

0 comments on commit ad2befa

Please sign in to comment.