feat(security): 新增域名所有权验证接口并更新安全配置

- 在SecurityConfig中允许访问新的验证文件路径 /MP_verify_joj96VBHPtL9YROj.txt
- 新增VerifyTxt2控制器,提供域名验证接口返回固定字符串
- 通过接口简化域名所有权验证流程,支持微信等平台验证需求
This commit is contained in:
2026-04-06 19:21:17 +08:00
parent 4eba22e42d
commit 17c9aa0bcd
2 changed files with 21 additions and 1 deletions

View File

@@ -86,7 +86,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
"/api/system/setting/getByKey/**", "/api/system/setting/getByKey/**",
"/api/system/setting/updateByKey/**", "/api/system/setting/updateByKey/**",
"/lvQ4EoivKJ.txt", "/lvQ4EoivKJ.txt",
"/api/wechat-cert-test" "/api/wechat-cert-test",
"/MP_verify_joj96VBHPtL9YROj.txt"
) )
.permitAll() .permitAll()
.anyRequest() .anyRequest()

View File

@@ -0,0 +1,19 @@
package com.gxwebsoft.common.system.controller;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Tag(name = "安全")
@RestController
@RequestMapping("/MP_verify_joj96VBHPtL9YROj.txt")
public class VerifyTxt2 {
@Operation(summary = "域名所有权验证")
@GetMapping()
public String verify(){
return "joj96VBHPtL9YROj";
}
}