elastic / app-search-javascript

Elastic App Search Official JavaScript Client
https://www.elastic.co/products/app-search
Apache License 2.0
66 stars 21 forks source link

CORS on https #28

Open johnsonfamily1234 opened 3 years ago

johnsonfamily1234 commented 3 years ago

Hello and thanks in advance for any information you might share.

I have a repo built around this which was working fine when going from http to http API Endpoint... but when deployed into https it's run into CORS issues. Have tried pretty much everything at this point. Figured I'd check in and see if anyone can sanity check the concept in general - is there any reason why this wouldn't work over https? Should I be thinking about this more as a "public key" search client?

I don't want to get too deep into sharing code yet as I'd have to redact but if anyone can sanity check me on whether it's an appropriate use of this for https, I'd appreciate it.

Thank you!

Ebsan commented 3 years ago

Did you make any progress on this?

Ebsan commented 3 years ago

I'm still working on this but wanted to post some findings. The CORS errors may be a red herring and the issue might actually have to do with your cert configurations and if your browser trusts the root certificate.

Try with different browsers, do you get the same error on each browser? Also, do you have the root certificate installed correctly (for Edge and Chrome it should be installed on your Windows Cert Store, and for Firefox you'll have to install it to the browser).