代理服务器超时

I'm making a REST call via frontend to download a file. At backend I'm creating a file and giving it a response.It works fine locally. But when I try to run front end and back end at two different system I'm getting proxy timeout error because the file download request it taking time at backend and probably my proxy server at frontend is giving me timeout. I can not make an Ajax call because of security reasons. Can anybody tell me a possible solution for this?