Y-Scholars / db.kscy.org_Front

Y Schola Web DB : 청소년 학술 웹 데이터베이스
1 stars 0 forks source link

Search Error #2

Closed jacepark12 closed 7 years ago

jacepark12 commented 7 years ago

XMLHttpRequest cannot load http://ec2-54-190-7-146.us-west-2.compute.amazonaws.com:8888/archive/_search?size=200&q=d. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4200' is therefore not allowed access.

No 'Access-Control-Allow-Origin' header is present on the requested resource.

이 부분을 해결해야할듯

enoxaiming commented 7 years ago

http://adrenal.tistory.com/16 글 한번 읽어줘!

enoxaiming commented 7 years ago

https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-http.html 여기에 http.cors.allow-origin 이부분 추가해주면 가능할거같기도해! 클라이언트 단에서 처리하는 방법은 위에 블로그와 같은데, 전부 한가지씩 문제가 있기도 하고(jsonp같은 경우 get만 사용가능, 외부 추가 설치 등..) 이게 가장 빠르지 않을까 라고 생각중 :) 사실 deploy 하면 해결되는 줄 알았는데, 찾아보니까 아닌거같네 ㅋㅋ

jacepark12 commented 7 years ago

GOOD

클라이언트 단에서 처리하기 애매하면 서버단에서 처리할께 Elasticsearch configuration만 수정하면될듯

jacepark12 commented 7 years ago

수정되는 시점에 issue close할께

jacepark12 commented 7 years ago

이슈해결완료 :)