Is it possible to have a hosts override with headless Chrome?

Is it possible to tell headless Chrome somehow to resolve example.com to 127.0.0.1 without editing /etc/hosts ? I am testing an oauth login flow where the provider determines the hostname where it redirects to based on the application ID and this makes automated testing problematic.