@@ -56,13 +56,14 @@ public class SystemConfig {
|
|||||||
|
|
||||||
public List<String> timestampHeaders = Stream.of("fizz-ts") .collect(Collectors.toList());
|
public List<String> timestampHeaders = Stream.of("fizz-ts") .collect(Collectors.toList());
|
||||||
|
|
||||||
public List<String> proxySetHeaders = new ArrayList<>();
|
public List<String> proxySetHeaders = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
@NacosValue(value = "${gateway.aggr.proxy_set_headers:}", autoRefreshed = true)
|
@NacosValue(value = "${gateway.aggr.proxy_set_headers:}", autoRefreshed = true)
|
||||||
@Value("${gateway.aggr.proxy_set_headers:}")
|
@Value("${gateway.aggr.proxy_set_headers:}")
|
||||||
public void setProxySetHeaders(String hdrs) {
|
public void setProxySetHeaders(String hdrs) {
|
||||||
if (StringUtils.isNotBlank(hdrs)) {
|
if (StringUtils.isNotBlank(hdrs)) {
|
||||||
|
proxySetHeaders.clear();
|
||||||
for (String h : StringUtils.split(hdrs, ',')) {
|
for (String h : StringUtils.split(hdrs, ',')) {
|
||||||
proxySetHeaders.add(h.trim());
|
proxySetHeaders.add(h.trim());
|
||||||
}
|
}
|
||||||
@@ -82,6 +83,8 @@ public class SystemConfig {
|
|||||||
@Value( "${custom.header.appid:}" )
|
@Value( "${custom.header.appid:}" )
|
||||||
public void setCustomAppHeaders(String hdrs) {
|
public void setCustomAppHeaders(String hdrs) {
|
||||||
if (StringUtils.isNotBlank(hdrs)) {
|
if (StringUtils.isNotBlank(hdrs)) {
|
||||||
|
appHeaders.clear();
|
||||||
|
appHeaders.add("fizz-appid");
|
||||||
for (String h : StringUtils.split(hdrs, ',')) {
|
for (String h : StringUtils.split(hdrs, ',')) {
|
||||||
appHeaders.add(h.trim());
|
appHeaders.add(h.trim());
|
||||||
}
|
}
|
||||||
@@ -94,6 +97,8 @@ public class SystemConfig {
|
|||||||
@Value( "${custom.header.sign:}" )
|
@Value( "${custom.header.sign:}" )
|
||||||
public void setCustomSignHeaders(String hdrs) {
|
public void setCustomSignHeaders(String hdrs) {
|
||||||
if (StringUtils.isNotBlank(hdrs)) {
|
if (StringUtils.isNotBlank(hdrs)) {
|
||||||
|
signHeaders.clear();
|
||||||
|
signHeaders.add("fizz-sign");
|
||||||
for (String h : StringUtils.split(hdrs, ',')) {
|
for (String h : StringUtils.split(hdrs, ',')) {
|
||||||
signHeaders.add(h.trim());
|
signHeaders.add(h.trim());
|
||||||
}
|
}
|
||||||
@@ -105,6 +110,8 @@ public class SystemConfig {
|
|||||||
@Value( "${custom.header.ts:}" )
|
@Value( "${custom.header.ts:}" )
|
||||||
public void setCustomTimestampHeaders(String hdrs) {
|
public void setCustomTimestampHeaders(String hdrs) {
|
||||||
if (StringUtils.isNotBlank(hdrs)) {
|
if (StringUtils.isNotBlank(hdrs)) {
|
||||||
|
timestampHeaders.clear();
|
||||||
|
timestampHeaders.add("fizz-ts");
|
||||||
for (String h : StringUtils.split(hdrs, ',')) {
|
for (String h : StringUtils.split(hdrs, ',')) {
|
||||||
timestampHeaders.add(h.trim());
|
timestampHeaders.add(h.trim());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user