Skip to content

Instantly share code, notes, and snippets.

@gbnk0
Created August 22, 2017 15:23
Show Gist options
  • Save gbnk0/decf0a848c9ce32b043310c71b636577 to your computer and use it in GitHub Desktop.
Save gbnk0/decf0a848c9ce32b043310c71b636577 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name localhost;
location / {
# Pass requests to ElasticSearch
proxy_pass http://localhost:9200;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
add_header Access-Control-Allow-Origin *;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment