Alanxtl commented on code in PR #1076:
URL: https://github.com/apache/dubbo-go-pixiu/pull/1076#discussion_r4500263077
##########
pkg/filter/http/proxyrewrite/rewrite.go:
##########
@@ -79,7 +79,8 @@ func (factory *FilterFactory) Apply() error {
if len(factory.cfg.UriRegex) != 2 {
return errors.Errorf("UriRegex len must == 2, %v",
factory.cfg.UriRegex)
}
- return nil
+ _, err := regexp.Compile(factory.cfg.UriRegex[0])
+ return err
Review Comment:
please check whether this func on the hot path, if it is, `regexp.Compile`
may cause performance issue
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]