Update proxy.js

Added asynch