Elasticsearch Search API: Are You Getting CORS?

Photo by Andrea Piacquadio from Pexels

Problem

Solution

1- Enable CORS from Elasticseach

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
http.cors.allow-credentials: true
sudo systemctl restart elasticsearch

2- Set up or use an existed proxy server

--

--

--

Certified AWS Solution Architect, Fullstack Software Engineer & DevOps. I like Solving Challenging Software Engineering Problems & Building Amazing Solutions.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Creating a IAM Role on AWS

Understanding about Cloud Computing

Flutter — “Hello World”

Customer Segmentation: The Key to Finding The Right Customers

First-party and third-party cookies

Three IT Trends Of 2022 You Need To Know

Automation-First Approach Using the Karate API Testing Framework

Part #2: How to read WASM

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Akintola L. F. ADJIBAO

Akintola L. F. ADJIBAO

Certified AWS Solution Architect, Fullstack Software Engineer & DevOps. I like Solving Challenging Software Engineering Problems & Building Amazing Solutions.

More from Medium

In Conversation with ELK Hands-On| Part2

Enable HTTPS using GoDaddy Generated SSL Certificate in Springboot

What is OAuth 2.0 — In a simple way

Elasticsearch With Docker: It Was Much Easier Than You Thought.