updated to also detect https requests