Allow Preference-Applied header check to include characters before or after the substring