Added basic header validation

Not exactly secure but it'll do for now.