tcp_accept_no_cl=yes
|
|
|
|
######## Basic HTTP request handling ########
|
|
loadmodule "xhttp.so"
|
|
|
|
#!ifdef WEBSOCKETS_ROLE
|
|
include_file "websockets-role.cfg"
|
|
#!endif
|
|
|
|
#!ifndef DISABLE_PROMETHEUS_STATS
|
|
include_file "prometheus.cfg"
|
|
#!endif
|
|
|
|
event_route[xhttp:request]
|
|
{
|
|
set_reply_close();
|
|
set_reply_no_connect();
|
|
|
|
#!ifdef WEBSOCKETS_ROLE
|
|
if($Rp == WS_PORT || $Rp == WSS_PORT) {
|
|
route("WEBSOCKET_REQUEST");
|
|
}
|
|
#!endif
|
|
|
|
#!ifndef DISABLE_PROMETHEUS_STATS
|
|
if( $Rp == PROMETHEUS_PORT) {
|
|
route("PROMETHEUS_REQUEST");
|
|
}
|
|
#!endif
|
|
|
|
xhttp_reply("200", "OK", "text/html", "<html><body>Wrong URL $hu</body></html>");
|
|
}
|
|
|