# Kibana 3 with nginx ldap authentication - doesn't accept OPTIONS method?

**URL:** <https://discuss.elastic.co/t/kibana-3-with-nginx-ldap-authentication-doesnt-accept-options-method/23223>\
**Category:** Elasticsearch\
**Created:** [April 14, 2015, 6:43am UTC](https://discuss.elastic.co/t/kibana-3-with-nginx-ldap-authentication-doesnt-accept-options-method/23223 "2015-04-14T06:43:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dee/32/18876_2.png) [@Dee](https://discuss.elastic.co/u/Dee)\
**Post date:** [April 14, 2015, 6:43am UTC](https://discuss.elastic.co/t/kibana-3-with-nginx-ldap-authentication-doesnt-accept-options-method/23223/1 "2015-04-14T06:43:25Z")

</div>

I have 2 virtual hosts on the same nginx server, that both use the  
nginx-auth-ldap [https://github.com/kvspb/nginx-auth-ldap](https://github.com/kvspb/nginx-auth-ldap) module. the  
first virtual host is the Kibana that is authenticating with ldap using  
nginx-auth-ldap, then it forwards the request to the second virtual host  
which is a reverse proxy to my elasticsearch server. My problem is that the  
second virtual host should have ldap authentication enabled too. I've used  
the information from this post's answer :How and where to implement basic  
authentication in Kibana 3  
[http://stackoverflow.com/questions/19867663/how-and-where-to-implement-basic-authentication-in-kibana-3/28530311#28530311](http://stackoverflow.com/questions/19867663/how-and-where-to-implement-basic-authentication-in-kibana-3/28530311#28530311)

1. Changed Kibana's config.js to -

elasticsearch: {server: "[http://localhost:9200](http://localhost:9200)", withCredentials: true},

1. Change my elasticsearch.yaml to have the following :

transport.tcp.port: 9300  
http.port: 9200  
http.cors.allow-credentials: true  
http.cors.allow-origin: "/.\*/"  
http.cors.enabled: true

But now when I send requests to Kibana, its saying that the Connection  
Failed, and the requests that I see failing are the OPTIONS requests that  
get 401 Unauthorized. Any other request (GET) seems to go through with the  
credentials. The next step on the previous post says that I need to- "white  
list the HTTP OPTIONS method in your reverse proxy configuration as only  
GET, PUT, POST and DELETE requests include the cookies."

Has anyone here done this and can share their experience ?

Thanks,

Diana.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/f836fafb-883d-4fc1-ba2d-948b2b3588d2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f836fafb-883d-4fc1-ba2d-948b2b3588d2%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:19am UTC](https://discuss.elastic.co/t/kibana-3-with-nginx-ldap-authentication-doesnt-accept-options-method/23223/2 "2017-07-06T00:19:58Z")

</div>


