Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
civil-bigdata
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
civil
civil-bigdata
Commits
214389be
Commit
214389be
authored
Jul 07, 2021
by
袁伟铭
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加区域年份统计定时任务
parent
aa068dd6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
api-server/src/main/java/com/zq/api/config/FeignConfig.java
+11
-5
No files found.
api-server/src/main/java/com/zq/api/config/FeignConfig.java
View file @
214389be
...
...
@@ -15,9 +15,15 @@ import java.util.List;
public
class
FeignConfig
{
private
static
final
List
<
String
>
HEADERS_TO_TRY
=
Arrays
.
asList
(
"X-Forwarded-For"
,
"Proxy-Client-IP"
,
"WL-Proxy-Client-IP"
,
"AUTHORIZATION"
,
"FORWARDED"
,
"X-FORWARDED-FOR"
,
"X-FORWARDED-PROTO"
,
"X-FORWARDED-PORT"
,
"X-FORWARDED-HOST"
,
"HOST"
,
"PROXY-CLIENT-IP"
,
"WL-PROXY-CLIENT-IP"
,
"HTTP_X_FORWARDED_FOR"
,
"HTTP_X_FORWARDED"
,
"HTTP_X_CLUSTER_CLIENT_IP"
,
...
...
@@ -26,7 +32,7 @@ public class FeignConfig {
"HTTP_FORWARDED"
,
"HTTP_VIA"
,
"REMOTE_ADDR"
,
"X-R
eal
-IP"
);
"X-R
EAL
-IP"
);
/**
* 解决fein远程调用丢失请求头
...
...
@@ -48,7 +54,7 @@ public class FeignConfig {
if
(
name
.
equals
(
"content-length"
))
{
continue
;
}
if
(
HEADERS_TO_TRY
.
contains
(
name
))
{
if
(
HEADERS_TO_TRY
.
contains
(
name
.
toUpperCase
()
))
{
String
values
=
request
.
getHeader
(
name
);
template
.
header
(
name
,
values
);
}
...
...
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