For security reasons, some of our customers need to restrict access to their resources by IP address. We currently share this list with them manually. Since it may change over time, we decided to automate the process and provide a simple API endpoint that returns the available IPv4 ranges. Instead of sharing exact IP addresses, we provide /16 CIDR ranges of IPv4 addresses to avoid exposing our addresses directly, which could make them vulnerable to attacks. Since customers may frequently call this endpoint, we don't want to run the query every time. Instead, we cache the result in a file and return the file's contents with cache headers. This way, the WAF can cache the result and return it to customers without hitting the API each time.
29 KiB
29 KiB