Fix allowed url types in when-method