Tag - cors

elasticsearch 全文检索 跨域 cors    2017-07-19 20:47:25    862
参考官方doc地址:https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-http.html



添加如下配置:
 http.cors.enabled: true
 http.cors.allow-origin: /http?:\/\/192.168.10.139(:[0-9]+)?/

http.cors.enabled 开启跨域访问支持,默认为false
http.cors.allow-origin 跨域访问允许的域名地址,以上使用正则,域名这里我替换了IP


重启下服务即可


 

by 刘迎光@萤火虫工作室 
OpenBI交流群:495266201 
MicroService 微服务交流群:217722918 
mail: liuyg#liuyingguang.cn 
博主首页(==防止爬虫==):http://blog.liuyingguang.cn