I'm kinda new to Apache2 and all the server stuff and I am facing a strange problem
I have set up a reverse proxy in apache.config, so that all the calls with /api/ will be forwarded to port 8015
when I try a Get that does meet meet the requirements for the Restlet server listening on 8015, and server responds with a HTTP 401 to port 80, I then see the 401 on front end(as expected), however, if I launch a valid GET within around 0.5 seconds after the 401, the request is forwarded to port 8015, port 8015 responds properly, but such response is never sent back to the front end
the problem does not appear if I wait for more than like 0.5 seconds after a 401
the problem gets worse if I get multiple 401s, then I have to wait for a longer period of time before I can successfully do a valid Get, the amount of time I have to wait is seemingly proportional to the number of 401s I get
In each failed case, the valid Get is received by port 8015, and a response if sent from port 8015, but not received by front end
after enabling CORS, directly communicating to port 8015 instead of using apache reverse proxy does not have this problem at all, I can do as many as 401s I want and do a successful Get right afterwards
from the observations above, I assume this has something to do with the way Apache2 reverse proxy deals with errors, but I am not sure and have not found much relevant information, any suggestions on how I might approach this problem?