stefanprodan / podinfo

Go microservice template for Kubernetes
Apache License 2.0
5.4k stars 1.72k forks source link

feat(ui): add xhr request header and a xhr status button #360

Open lsjostro opened 6 months ago

lsjostro commented 6 months ago

This PR adds X-Requested-With header for the xhr request, which is sort of standard in many JS ajax libs world. Say you have a auth proxy in front of podinfo and session expires, would be nice to notify user to reload the page to re authenticate. I have added a button which pops up only if xhr status not 200, clicking that reloads the page.

More info about AJAX requests and how to detect them can be found here: https://cloud.google.com/iap/docs/sessions-howto#understanding_the_response

image