if you are going to do the protocol check, I'd make that a condition for proxying
```if (proxiedUrl && proxiedUrl.protocol.indexOf('http') === 0)```