As far as the allergy goes you need to consult an AME (Aviation Medical Examiner) but yes the severity matters. Let's say you're flying along having a grand old time when the other pilot offers you a peanut. You accidentally inhale some peanut dust and go into anaphylactic shock. That would be a problem.