From ea768290389ac525b038fc825712a721207ec360 Mon Sep 17 00:00:00 2001 From: jiwonkim Date: Fri, 14 Feb 2025 16:25:47 +0900 Subject: [PATCH] =?UTF-8?q?feat=20#69=20:=20Proxy=20=EC=84=9C=EB=B2=84=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../buildOutputCleanup.lock | Bin 17 -> 17 bytes .gradle/file-system.probe | Bin 8 -> 8 bytes .../giftidea/controller/ProxyController.java | 18 ++++++++++++++++++ 3 files changed, 18 insertions(+) create mode 100644 src/main/java/com/team4/giftidea/controller/ProxyController.java diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index ee6cb6e8c7a169b2f467c9eda9bfdcf35e0c265a..784aa36835f316b4dd07021484b954241f3eeb7f 100644 GIT binary patch literal 17 VcmZRc_VA=6%hWql8NfhvKL9vu1v>x$ literal 17 VcmZRc_VA=6%hWql8NfhP8~``N1d{*& diff --git a/.gradle/file-system.probe b/.gradle/file-system.probe index 7c1226e342cb08acba49acb7e4912b5e78948e77..e3f06e7a94291fc5619b52229560346ab86212d9 100644 GIT binary patch literal 8 PcmZQzV4TVvvfwNL1`GmQ literal 8 PcmZQzV4TYIYJUy@2d4tA diff --git a/src/main/java/com/team4/giftidea/controller/ProxyController.java b/src/main/java/com/team4/giftidea/controller/ProxyController.java new file mode 100644 index 0000000..a4eec70 --- /dev/null +++ b/src/main/java/com/team4/giftidea/controller/ProxyController.java @@ -0,0 +1,18 @@ +package com.team4.giftidea.controller; + +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.client.RestTemplate; + +@RestController +@RequestMapping("/api/proxy") +public class ProxyController { + + private final RestTemplate restTemplate = new RestTemplate(); + + @GetMapping("/kream") + public ResponseEntity proxyToKream(@RequestParam String url) { + String response = restTemplate.getForObject(url, String.class); + return ResponseEntity.ok(response); + } +} \ No newline at end of file