Nginx 502 With Js Window Object In Jquery