Revert "fix redirect issues"

This reverts commit 87e85dfaebeaa771d177981986e6c2b26cf6b4ff.
set referer in tests