Project

General

Profile

How To Close Connnection Based On Rule

Added by JustinK101 about 13 years ago

Hello, I am looking to just end/close a http connection, based on a rule. Basically, I only want users to be able to access api.mydomain.com through SSL, so https. If they try and access http://api.mydomain.com, I just want the connection to reset/terminate.

$HTTP["host"] =~ "api\.mydomain\.com$" {
    $HTTP["scheme"] == "http" {
               //HOW TO CLOSE/RESET/END THE CONNECTION?
               //I SUPPOSE SENDING 501 (Not Implemented), or 404 (Not Found) WOULD BE OK, BUT WOULD RATHER JUST CLOSE THE CONNECTION
    }
}