Recommend adding detailed inline comment to explain the purpose of the parsedReferer check.  Similar to your pull request comment.  It's a very specific case and in the future it will be difficult to determine why it's there.  Will also help out the much needed Node redirect refactor.