# on-campus-counter

This middleware adds an on_campus field containing Y or N depending on the IP contained in the host field. It also increments two counters in the report : on-campus-accesses and off-campus-accesses.

By default, only private IPv4 addresses (opens new window) are considered on-campus. More ranges can be added by providing an onCampusCounter key in the ezPAARSE configuration (config.local.json).

onCampusCounter should be an array, where each element is either a valid range string, or an object with a string property label and an array property ranges containing valid range strings. Ranges also accept single IPv4 addresses.

When a range is associated with a label, on_campus will contain the label instead of Y.

# Example

  "onCampusCounter": [
      "label": "Campus name",
      "ranges": ["", "", ""]
Last Updated: 11/24/2020, 10:11:20 AM