ConnectivityChecker: Remove double // in aliveCheckUrl causing Invalid Redirect URL with CloudFlare Access. #535
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Bug Fix
When Homer is protected behind CloudFlare Access, the
ConnectivityChecker
builds analiveCheckUrl
with something like:and makes an HTTP
HEAD
to thehomer.domain.net
to verify connectedness.The problem arises when the cookie protecting
homer.domain.net
is expired; and results in anHTTP 302
redirect to a login page.The browser follows the
HTTP 302
redirect and the user lands on a site like:Notice the URL encode
redirect_url=%2F%2Findex.html
. Decoded, theredirect_url
looks something like//index.html
. The double//
in theredirect_url
causes CloudFlare Access to display the following error page (instead of a proper Login Page or Redirect):If we remove the leading
%2F
from theredirect_url
so that we have:redirect_url=%2Findex.html...
; we get the expected login page and/or a proper redirect with the necessary authorization cookies.Feel free to push modifications or changes to this PR.
Thanks,
Brian
Type of change
Checklist:
config.yml
file