Ability to close connection like nginx http response 444?

Nginx has the nice option to close the connection without any response if somebody is trying to request a specific path:
location /some-specific-path-only-with-vpn {
return 444;
}

Is this possible with caddy but not documented? I cant find something in the documentation about the ability to close the tcp connection with reqrite rules.

Status 444 seems to be a non standard code that only nginx uses.

I dont think caddy has any way to simply close the tcp connection.

Is there a specific reason why it would be desireable to actually close the tcp connection?

Yeah, I’m curious as to why a TCP reset is required over a Status 403 (Forbidden), which would be the proper way to reject a connection in this circumstance.

Internal provides a kinda similar feature, but returns a 404:
https://caddyserver.com/docs/internal

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.