fix: Works for https and redirects