primarily modified route replace to prevent loop, added custom header, increased timeout, added some console logging
added console message (not output in prod) + comments