Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Masking request_uri in analytics for microgateway

Not applicable

Hi,

We want to mask request_uri, request_path and proxy_pathsuffix when it gets logged into analytics.

After looking at https://github.com/apigee-127/volos/blob/master/analytics/apigee/lib/apigeeanalytics.js, we had gone ahead and set the value of req.url to *** in a plugin as follows -

module.exports.init = function(config, logger, stats) {
  return {
    onend_response: function(req, res, data, next) {
      req.url = '*****';
      // oauth
      if (req.token) {
        req.token.access_token = '*****';
      }
      next(null, null);
    }
  };
}

But, the data is not being masked when we query analytics.

We are currently trying with 2.3.3-beta of edgemicro.

P.S: This is continuation of discussion at https://github.com/apigee/microgateway-plugins/pull/6. Since that has been closed.

Thanks,

Jaskaran

0 9 190
9 REPLIES 9