Pierre Souchay b4590fb8e8 Display nicely Networks (CIDR) in runtime configuration (#6029)
* Display nicely Networks (CIDR) in runtime configuration

CIDR mask is displayed in binary in configuration.
This add support for nicely displaying CIDR in runtime configuration.

Currently, if a configuration contains the following lines:

  "http_config": {
    "allow_write_http_from": [
      "127.0.0.0/8",
      "::1/128"
    ]
  }

A call to `/v1/agent/self?pretty` would display

  "AllowWriteHTTPFrom": [
            {
                "IP": "127.0.0.0",
                "Mask": "/wAAAA=="
            },
            {
                "IP": "::1",
                "Mask": "/////////////////////w=="
            }
  ]

This PR fixes it and it will now display:

   "AllowWriteHTTPFrom": [ "127.0.0.0/8", "::1/128" ]

* Added test for cidr nice rendering in `TestSanitize()`.
2019-07-23 16:30:16 -04:00
..
2019-07-12 09:52:26 -06:00
2018-11-02 12:00:39 -05:00
2019-07-12 09:52:26 -06:00
2018-10-19 12:04:07 -04:00
2019-07-23 14:45:20 -04:00
2018-10-19 12:04:07 -04:00
2018-10-19 12:04:07 -04:00
2019-07-01 16:28:30 -04:00
2019-07-15 18:09:30 +00:00
2019-06-24 14:11:34 -04:00
2019-03-27 08:54:56 -04:00
2019-06-26 11:43:30 -05:00
2019-07-01 16:28:30 -04:00
2019-03-27 08:54:56 -04:00
2019-07-01 16:28:30 -04:00
2019-04-25 12:26:33 -04:00
2019-03-27 08:54:56 -04:00