04-18-2023, 08:29 PM
(This post was last modified: 04-19-2023, 11:11 PM by Alexandre Machado.)
I don't see how you can do this using HTTP protocol. When the browser connects to the server there are 2 possibilities: The server responds at some point or the connection is broken (and the browser detects it and knows that the connection has been broken). What you want is to deny a connection before knowing the nature of the request, which I think won't succeed. You could try to block the request/connection at a router or proxy level based on the IP of the origin.

