Same-origin redirect detection microlibrary.