We have a ngnix which redirects to Consul-UI.
We have no issues with redirection with Consul 1.7.2+ent. But after upgrading to Consul1.10.1+ent we are seeing 404 - please check attached screenshot.
Example :- https://xyz.abc.com/my-console/ redirects to
https://xyz.abc.com/ui/my-console/consul/ui/
I can confirm ACL is enabled / set to true. But in consul-ui code - CONSUL_ACLS_ENABLED is returning false (which is disabling the UI elements).
@service('env') env;
get can() {
return this.env.var('CONSUL_ACLS_ENABLED');
}
But after we click on Go back in the attached screenshot - it lists the consul services (https://xyz.abc.com/ui/xyz/services), but we do not see any options to select nodes/services/key value/ intentions etc.
Below is the html code which redirects to Consul UI :-
<div class="consul btn-logo" onclick="window.location.href='/my-console/consul/ui/';">
<div class="logo"></div>
<div class="fd-button fd-button--emphasized"> Consul</div>
</div>
Nginx rewrite conf :-
location ~ ^/(consul|nomad) {
if ($request_method ~ "(PUT)|(POST)" ) {
return 405;
}
rewrite ^/(consul)/(.*)$ /$2 break;
include custom.location.conf;
proxy_pass http://$1-ws;
proxy_set_header Accept-Encoding "";
}
Below is the custom.location.conf :-
sub_filter_once off;
sub_filter_types *;
sub_filter '/ui//' '/my-console/$1/ui//';
sub_filter 'rootURL: \'/ui/\'' 'rootURL: \'/my-console/$1/ui/\'';
sub_filter '/ui/assets' '/my-console/$1/ui/assets';
sub_filter '\"v1\"' '\"my-console/$1/v1\"';
sub_filter '/v1/' '/my-console/$1/v1/'
I wanted to know if its an issue with ACLs or any nginx configuration or the consul-ui version! I can provide more information if needed
Any help or guidance would be appreciated, thanks.