Skip to main content
bunny.net adds the CDN-RequestCountryCode header to every request. This script reads it and routes the listed countries to a second origin.
Add or remove entries in ALTERNATE_COUNTRIES to change which countries get the alternate origin.
Last modified on July 10, 2026