One of the possibilities is that in your elasticsearch.yml
you have
CORS enabled and the regex you use to match the origin doesn’t work.
For example Chrome extensions add chrome-extension:// to the origin and matching it as /https?:\/\/.+/
won’t work.
Instead you may use broader regex:
http.cors.enabled: true
http.cors.allow-origin: /.*/