Added xff functionality

Signed-off-by: Joseph Lee <joseph@idealist.org>