Using nginx in front of my local confluence server (not listening on the internet) and used the following:
location ~\* \$\{. {
deny all;
}
but this only helps if this vulnerability is triggered using the request uri otherwise it's useless