Update proxy.js

Fixing bug when extending `opts`