NOW everything works - code was wrong before, had everything backwards - everything was happening in the server when it should have been in the proxy