Kibana error loop redirect login page - when config server.basePath

I run kibana:7.1.0 - elasticsearch:7.1.0
My config: /usr/share/kibana/config/kibana.yml
"
server.name: kibana
server.host: 0.0.0.0
elasticsearch.hosts: http://elasticsearch:9200
"
Everything woking on http://ip:5601

But when i add config "server.basePath: /kib" - (use for proxy), it not working
Hitting access kibana: http://ip:5601/kib -> redirect login page.
The login page looping redirect:
http://ip:5601/kib/login?next=%2Fkib%2Fkib%2Flogin%3Fnext%3D%2Fkib%2Fkib%2Flogin%3Fnext%3D%252Fkib%252..........

Hey @NguyenVanTrieu, this is being caused by https://github.com/elastic/kibana/issues/36825. We're actively investigating a solution, but in the mean-time if you close your browser and re-open it, or clear your cookies, you should get out of the infinite redirect.