You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/11/10 07:46:38 UTC

[GitHub] [dubbo-go-pixiu] Zvoid opened a new issue, #519: "dgp.filter.http.accesslog" filter can't be used by XDS

Zvoid opened a new issue, #519:
URL: https://github.com/apache/dubbo-go-pixiu/issues/519

   My config:
   {
       "name": "dgp.filter.httpconnectionmanager",
       "struct": {
           "http_filters": [
               {
                   "name": "dgp.filter.http.directdubboproxy"
               },
               {
                   "name": "dgp.filter.http.accesslog",
                   "config": {
                       "outPutPath": "C:\\aa.log"
                   }
               }
           ]
       }
   }
   However, "conf" is nil in the access_log filter.
   file: access_log.go.
   func (factory *FilterFactory) PrepareFilterChain(ctx *http.HttpContext, chain filter.FilterChain) error {
   	f := &Filter{alw:  factory.alw} // Filter.conf is nil
   	chain.AppendDecodeFilters(f)
   	chain.AppendEncodeFilters(f)
   	return nil
   }
   
   I modified it. it work.
   
   func (factory *FilterFactory) PrepareFilterChain(ctx *http.HttpContext, chain filter.FilterChain) error {
   	f := &Filter{
   		alw:  factory.alw,
   		conf: factory.conf,
   	}
   	chain.AppendDecodeFilters(f)
   	chain.AppendEncodeFilters(f)
   	return nil
   }
   


-- 
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: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org