nginx-ingress basic authentication for only a given path?

12/4/2019

Using nginx-ingress, is it possible to enable basic authentication only for a given path (or enable it for all paths and exclude some paths from it)?

The documentation only shows how to protect all paths.

-- stefan.at.wpf
kubernetes
nginx-ingress

1 Answer

12/4/2019

You could write a seperate ingress rule for your given path such that only this path is protected by basic authentication.

See this answer for examples.

-- Fei
Source: StackOverflow