Same fix as coffey-labs/ihasmail#52 (for coffey-labs/ihasmail#47): when a sign-in proxy's session runs out, the app sends you to the proxy's login instead of failing with a network error.
Same fix as coffey-labs/ihasmail#52 (for coffey-labs/ihasmail#47): when a sign-in proxy's session runs out, the app sends you to the proxy's login instead of failing with a network error.
Behind Cloudflare Access or a similar proxy, an expired proxy session
answers every API call with a redirect to the proxy's login on another
origin. A fetch can't follow that, so it failed as a network error, and
an installed app never got out of it: it opens on an app route the
service worker serves from its kept copy, so nothing navigated to the
network for the proxy to catch (coffey-labs/ihasmail#47).
When an API call fails at the network, or comes back redirected to a
page that isn't ours, the app now asks /api/health without following
redirects. A redirect or an HTML answer means the proxy is asking, and
the root is opened for real, which the service worker always sends to
the network. At most once a minute, so a misconfigured proxy can't loop.
Port of coffey-labs/ihasmail#52, which fixescoffey-labs/ihasmail#47.
(cherry picked from commit 18a661144ed655412f52cd709e7d6530a8ebf994)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Same fix as coffey-labs/ihasmail#52 (for coffey-labs/ihasmail#47): when a sign-in proxy's session runs out, the app sends you to the proxy's login instead of failing with a network error.