Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
RuoYi Vue
Commits
9e995159
Commit
9e995159
authored
Sep 08, 2023
by
gu-jinli1118
Browse files
跨域方法不识别
parent
4c388775
Pipeline
#37
failed with stages
in 0 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java
View file @
9e995159
...
@@ -57,7 +57,7 @@ public class ResourcesConfig implements WebMvcConfigurer
...
@@ -57,7 +57,7 @@ public class ResourcesConfig implements WebMvcConfigurer
CorsConfiguration
config
=
new
CorsConfiguration
();
CorsConfiguration
config
=
new
CorsConfiguration
();
config
.
setAllowCredentials
(
true
);
config
.
setAllowCredentials
(
true
);
// 设置访问源地址
// 设置访问源地址
config
.
addAllowOrigin
s
(
"*"
);
config
.
addAllow
ed
Origin
(
"*"
);
// 设置访问源请求头
// 设置访问源请求头
config
.
addAllowedHeader
(
"*"
);
config
.
addAllowedHeader
(
"*"
);
// 设置访问源请求方法
// 设置访问源请求方法
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment