From 881307a4ea382b513182b8c986eee2b7a707cf5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E5=AE=87=E5=A5=87?= Date: Tue, 11 Nov 2025 21:46:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=94=E5=9B=9Ehtml=E6=97=B6=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=93=8D=E5=BA=94=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/web/controller/common/CommonController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java index 9a4e31077..595ceb889 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java @@ -33,6 +33,7 @@ import org.springframework.web.bind.annotation.*; import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; +import javax.servlet.http.HttpServletResponse; import java.nio.charset.Charset; import java.time.Instant; import java.time.ZoneId; @@ -252,7 +253,8 @@ public class CommonController { @ApiOperation("获取html内容") @GetMapping("/html/content/{title}") - public String getHtmlContent(@PathVariable("title") String title) { + public String getHtmlContent(@PathVariable("title") String title, HttpServletResponse response) { + response.setHeader("X-Frame-Options", "ALLOWALL"); return htmlService.getHtmlContent(title); }