From 0dcc3389d72fcf5f2de8154a35231f8d6c81b458 Mon Sep 17 00:00:00 2001 From: zrh050423 <14331304+zrh050423@user.noreply.gitee.com> Date: Mon, 16 Dec 2024 01:12:35 +0800 Subject: [PATCH] 1 --- src/main/java/edu/zrh/healthsystem/config/WebLoginConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/edu/zrh/healthsystem/config/WebLoginConfig.java b/src/main/java/edu/zrh/healthsystem/config/WebLoginConfig.java index 8edfa5d..b22b8cf 100644 --- a/src/main/java/edu/zrh/healthsystem/config/WebLoginConfig.java +++ b/src/main/java/edu/zrh/healthsystem/config/WebLoginConfig.java @@ -9,7 +9,7 @@ public class WebLoginConfig implements WebMvcConfigurer { @Override public void addCorsMappings(CorsRegistry registry) { - registry.addMapping("/**") // 对所有路径应用此规则 + registry.addMapping("/") // 对所有路径应用此规则 .allowedOrigins("http://localhost:3000") // 允许来自这个源的请求 .allowedMethods("GET", "POST", "PUT", "DELETE") // 允许的HTTP方法 .allowedHeaders("*") // 允许的请求头