Ajax call to open the Kibana page

Hi there,
What was the "better way"? Can you tell me please?
I'm trying to use kibana visual, inside my web app but i need to authenticate with ajax call. Same preflight error happens.