Login api call fails

I will use Kibana inside iframe in my web app. For this purpose i need to call login api "/api/security/v1/login".
In postman i could call the api, success response came. But when i call the api via javascript&ajax, browser(chrome) sends preflight request before the real POST request and this preflight request fails : "Response for preflight has invalid HTTP status code 404"
What should i do for solving this problem?

1 Like


What is the version of Kibana you are using ? Also if its >5.0, and if x-pack is installed, can you enable audit logging for security and see the logs. More information would be helpful.



Version is 5.3.0
Kibana and Elastic search running on elastic cloud. Every settings are on default.

I tried to add "shield.audit.enabled: true" to yml file using ./configuration/User Settings editor in cloud page. But it seems it is not allowed configuration type.

Supported configuration listed at this link:


This is how i call login: This code generated by postman, where i can call login succesfully.

Response to this call :
{"statusCode":404,"error":"Not Found"}
Response for preflight has invalid HTTP status code 404

Postman response:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.