yhs0092 commented on a change in pull request #1209: [SCB-1278] Not send x-cse*
header to third party service by default
URL:
https://github.com/apache/servicecomb-java-chassis/pull/1209#discussion_r288127591
##########
File path:
core/src/main/java/org/apache/servicecomb/core/definition/OperationConfig.java
##########
@@ -61,6 +61,20 @@
@InjectProperty(keys = {"request.${op-any-priority}.timeout",
"request.timeout"}, defaultValue = "30000")
private long msRequestTimeout;
+ /**
+ * whether to remove certain headers from the 3rd party invocations
+ */
+ @InjectProperty(keys =
{"request.${op-any-priority}.clientRequestHeaderFilterEnabled",
+ "request.clientRequestHeaderFilterEnabled"}, defaultValue = "true")
+ private boolean clientRequestHeaderFilterEnabled = true;
+
+ /**
+ * the matched headers should be removed, in invocations to 3rd party
services
+ */
+ @InjectProperty(keys =
{"request.${op-any-priority}.clientRequestHeaderFilterPattern",
+ "request.clientRequestHeaderFilterPattern"}, defaultValue = "^x-cse.*")
+ private String clientRequestHeaderFilterPattern = "^x-cse.*";
Review comment:
The logic is simplified. Now just remove all of the related headers, no
regex pattern.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services