Skip to content

Instantly share code, notes, and snippets.

@thoolihan
Created November 25, 2014 15:03
Show Gist options
  • Save thoolihan/552c57645f5bb0e24667 to your computer and use it in GitHub Desktop.
Save thoolihan/552c57645f5bb0e24667 to your computer and use it in GitHub Desktop.
Web Page to test Elasticsearch CORS Config
<!DOCTYPE html>
<html>
<head>
<title>Test ElasticSearch</title>
</head>
<body>
<h1>Response to /_nodes</h1>
<p id="results"></p>
</body>
<script src="https://code.jquery.com/jquery-2.1.1.js"></script>
<script>
$(function() {
$.getJSON("http://localhost:9200/_nodes", function(data) {
$('p#results').text(JSON.stringify(data));
}).error(function(xhr) {
console.log("error");
});
});
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment