How to disable the extensions fields on production?

i’m facing same issue as here: disable debug graphql federation ( "extensions" field) · Apollo — ideally will love to disable extensions field in prod. The gateway add serviceName and exception to the extensions field. How cna i disable this?

right now i’m doing this in the gateway;

formatError(e) {
  delete e.extensions['exception']
  delete e.extensions['serviceName']
  return e