Description
Checklist:
- I've searched in the docs and FAQ for my answer: http://bit.ly/argocd-faq.
- I've included steps to reproduce the bug.
- I've pasted the output of
argocd version
.
Describe the bug
When setting basehref and using the Nginx rewrite annotation, any calls to retrieve application history will fail. After discussion with @alexmt on Slack, the issue appears to be that the API expects an encoded URL for the App repo, but Nginx will decode any URLs as part of the rewrite, which causes the API call to fail
Expected:
/api/v1/repositories/https%3A%2F%2Fgithub.com%2Fargoproj%2Fargocd-example-apps/apps?revision=HEAD
argocd receives
/api/v1/repositories/https:/github.com/argoproj/argocd-example-apps/apps
To Reproduce
Set up ArgoCD with a custom basehref behind an Nginx ingress route with rewrite configuration as described in the docs here: https://argoproj.github.io/argo-cd/operator-manual/ingress/#ui-base-path
Set up an application from a Git repo and make a change
Open the History and Rollback menu for the app
Expected behavior
List of revisions populated with deltas for old revisions
Observed behavior
Deltas fail to populate, backend logs a 404
Suggested fix
I suggest one of two solutions to this issue:
- Have basehref affect the base API path as well as the UI, removing the need for the rewrite annotation
- Have these calls use an internal UUID or some other non-encoded value so the Nginx decode doesn't break them
Version
v1.5.0-rc1+3684a10