Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
hmit-cloud
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xuhuanchao
hmit-cloud
Commits
9479f470
Commit
9479f470
authored
Feb 17, 2023
by
xuhuanchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
跨域
parent
c82fc92f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
CorsConfig.java
...way/src/main/java/com/hmit/gateway/config/CorsConfig.java
+3
-7
No files found.
hmit-gateway/src/main/java/com/hmit/gateway/config/CorsConfig.java
View file @
9479f470
...
...
@@ -13,18 +13,13 @@ import org.springframework.web.server.WebFilter;
import
org.springframework.web.server.WebFilterChain
;
import
reactor.core.publisher.Mono
;
/**
* 跨域配置
*
* @author ruoyi
*/
@Configuration
public
class
CorsConfig
{
/**
* 这里为支持的请求头,如果有自定义的header字段请自己添加
*/
private
static
final
String
ALLOWED_HEADERS
=
"X-Requested-With, Content-Type, Authorization, credential, X-XSRF-TOKEN, token, Admin-Token, App-T
oken"
;
private
static
final
String
ALLOWED_HEADERS
=
"X-Requested-With, Content-Type, Authorization, credential, X-XSRF-TOKEN, token, Admin-Token, App-Token, ist
oken"
;
private
static
final
String
ALLOWED_METHODS
=
"GET,POST,PUT,DELETE,OPTIONS,HEAD"
;
private
static
final
String
ALLOWED_ORIGIN
=
"*"
;
private
static
final
String
ALLOWED_EXPOSE
=
"*"
;
...
...
@@ -54,4 +49,5 @@ public class CorsConfig
return
chain
.
filter
(
ctx
);
};
}
}
\ No newline at end of file
}
Write
Preview
Markdown
is supported
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