Domenico
Domenico

Reputation: 5

Kubernetes nginx ingress returning 404 for unset routes

I configured my kubernetes cluster to run nginx as the ingress controller. Everything works just fine and has done so for some time now.

I noticed though that for unconfigured routes (like when accessing via the ip itself, or accessing a subdomain that is not set up) it returns the default backend and it's a 404.

I would like for it to just drop the connection instead, as returning this 404 also means that the connection is via http and not https.

I tried creating a custom default backend (a go application) returning 444 or 418 or just dropping the connection altogether, but it doesn't seem to work.

Is there a built in way to just drop connections to these unconfigured routes?

Thanks

Upvotes: -3

Views: 28

Answers (0)

Related Questions