make sure both headers are set before checking for ip spoofing
(cherry picked from commit ccd6f8b931efa7b3eb191a62522fbfc89389b091)

Signed-off-by: Andrew White <andyw@pixeltrix.co.uk>