not necessary for this PR, but we could eventually consider promoting these to a LOCAL_TEST_DOMAINS tuple and unify the check into something like:

```py
if domain in LOCAL_TEST_DOMAINS:
  url = url.replace(domain, 'localhost')
```