We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NGINX Ingress controller version: 0.41.0
Kubernetes version (use kubectl version): v1.17.5
kubectl version
Environment:
uname -a
What happened:
With following Ingress:
apiVersion: extensions/v1beta1 kind: Ingress metadata: annotations: kubernetes.io/ingress.class: nginx name: an-ingress spec: rules: - http: paths: - backend: serviceName: a-service servicePort: 80 path: /prefix/
Got HTTP 404 when accessing /prefix/foo/bar.
HTTP 404
/prefix/foo/bar
What you expected to happen:
Path with a trailing slash should work as the prefix.
When I turn on debug log level:
2020/11/12 09:25:47 [debug] 72368#72368: *3797004 code cache lookup (key='rewrite_by_lua_nhli_d8124e310757dec7b05144568a4babe7', ref=-1) 2020/11/12 09:25:47 [debug] 72368#72368: *3797004 code cache miss (key='rewrite_by_lua_nhli_d8124e310757dec7b05144568a4babe7', ref=-1) 2020/11/12 09:25:47 [debug] 72368#72368: *3797004 lua creating new thread 2020/11/12 09:25:47 [debug] 72368#72368: *3797004 lua reusing cached lua thread 00007FE683EDB5E0 (ref 2) 2020/11/12 09:25:47 [debug] 72368#72368: *3797004 lua reset ctx 2020/11/12 09:25:47 [debug] 72368#72368: *3797004 http lua finalize threads 2020/11/12 09:25:47 [debug] 72368#72368: *3797004 http cleanup add: 00005609E27EBDB0 2020/11/12 09:25:47 [debug] 72368#72368: *3797004 lua run thread, top:0 c:1 2020/11/12 09:25:47 [debug] 72368#72368: *3797004 lua exit with code 404 2020/11/12 09:25:47 [debug] 72368#72368: *3797004 lua resume returned 1
It exits with HTTP 404 from lua_ingress.rewrite(), which call k8s_matches_pathtype_prefix() https://github.com/kubernetes/ingress-nginx/blob/controller-v0.41.0/rootfs/etc/nginx/lua/lua_ingress.lua#L100-L117
lua_ingress.rewrite()
k8s_matches_pathtype_prefix()
It should ignore the trailing slash at the beginning.
How to reproduce it:
Anything else we need to know:
/kind bug
The text was updated successfully, but these errors were encountered:
Closing. Fixed in #6443
Sorry, something went wrong.
No branches or pull requests
NGINX Ingress controller version: 0.41.0
Kubernetes version (use
kubectl version
): v1.17.5Environment:
uname -a
): 4.4.0-142-genericWhat happened:
With following Ingress:
Got
HTTP 404
when accessing/prefix/foo/bar
.What you expected to happen:
Path with a trailing slash should work as the prefix.
When I turn on debug log level:
It exits with
HTTP 404
fromlua_ingress.rewrite()
, which callk8s_matches_pathtype_prefix()
https://github.com/kubernetes/ingress-nginx/blob/controller-v0.41.0/rootfs/etc/nginx/lua/lua_ingress.lua#L100-L117
It should ignore the trailing slash at the beginning.
How to reproduce it:
Anything else we need to know:
/kind bug
The text was updated successfully, but these errors were encountered: