için istenen kaynağa 'Erişim-Kontrol-İzin-Kökeni' başlığı mevcut değil Angular JS'den bir elastik arama web servisi çağırmak istiyorum. Aşağıda gibi sesleniyorum zaman:Preflight istek hatası: Elastic Search
http.cors.enabled : true //
http.cors.allow-origin: "/.*/"
http.cors.allow-methods : OPTIONS, HEAD, GET, POST, PUT, DELETE
http.cors.allow-headers : "X-Requested-With,X-Auth-Token,Content-Type, Content-Length, Authorization"*
Ama sonra:
XMLHttpRequest cannot load http://[IP]:9200/providers3/provider3/_search. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin "http://localhost:8085" is therefore not allowed access.
Ben elasticsearch.yml aşağıda dosyada değişiklikler yaptı:
$http.post('http://[IP]:9200/providers3/provider3/_search',JSON.stringify(objToSend)).success(function(){
console.log('Data sent successfully!!');
});
bu hatayı alıyorum Bu satırları .yml dosyasına ekleyerek Elastic arama sunucusu başlatılamıyor.
Lütfen herhangi bir kişi yardım edebilir mi?
CROS desteğini eklediniz mi? – micronyks
CORS olarak destekleniyor mu? –
CORS'te angulars içinde çok sayıda sonuç elde edersiniz. Siz soruma aittir. – micronyks