问题
If my elasticsearch could be called directly from jQuery it would be much faster and simpler. I currently have a proxy in the middle of my static site and ES cluster.
I have been looking at Search Guard from another answer on here but many features of this wouldn't work e.g. IP blocking as if it was a jQuery script it would be called from my static site visitors IP. Likewise if I have a password and put it in a jQuery script the user would see it.
I have also tried going further up the chain and adding read-only block in my elasticsearch.yml but this doesn't feel like much of a defense on its own.
Is there any way of safely allowing my ES cluster (via URL) to be searched directly from a client-side JS/jQuery script? It would be fantastic if I could get rid of this proxy VM in between.
来源:https://stackoverflow.com/questions/47001569/safely-searching-elasticsearch-from-client-side