how to set http.cors.allow-origin in es
when i wan't to only two ip can use elasticsearch-head connect to es?
how can set teh http.cors.allow-origin
this is one ip http.cors.allow-origin: /https?://localhost(:[0-9]+)?/
how about two ip settings?
some on can help me ?
thanks..
can solve it
@elastic
thanks..
Please see the documentation - if you prepend and append a / then the value is treated as a regular expression. You need to create a regular expression that matches your two hosts.
yes.i know, but i don't know how to create a regular expression that matches two hosts.
can give me a example
thanks..
@spinscale
is linke this http.cors.allow-origin: /https?://localhost(:[0-9]+)?/http?://xxx.xxx.xxx.xxx(:[0-9]+)?
try something like https?:\/\/(localhost|otherhost.org)(:[0-9]+)? (fully untested, you should go with some regex tester first and then see if the regex is doing what you expect)
thanks.
this slove it.