Updated detection hook to use modified process_url