diff --git a/http-encryption/src/main/java/com/example/httpencryption/controller/TestController.java b/http-encryption/src/main/java/com/example/httpencryption/controller/TestController.java index 30ed9667..8ce00fbd 100644 --- a/http-encryption/src/main/java/com/example/httpencryption/controller/TestController.java +++ b/http-encryption/src/main/java/com/example/httpencryption/controller/TestController.java @@ -2,6 +2,7 @@ package com.example.httpencryption.controller; import com.example.httpencryption.dto.TestDto; import org.apache.commons.io.IOUtils; +import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; @@ -14,6 +15,7 @@ import java.nio.charset.StandardCharsets; @RestController public class TestController { + @CrossOrigin @PostMapping("/") public TestDto hello(HttpServletRequest request, @RequestBody TestDto dto) throws IOException { diff --git a/http-encryption/src/main/resources/templates/index.html b/http-encryption/src/main/resources/templates/index.html index 8d19a589..1d866386 100644 --- a/http-encryption/src/main/resources/templates/index.html +++ b/http-encryption/src/main/resources/templates/index.html @@ -6,24 +6,46 @@