You should talk to the doctor or pharmacist about your allergy prior to receiving the vaccine. Have you had an allergic reaction to any other medications or vaccines? If not, it is likely that your allergy is limited to opioids.
i'm not sure why people are telling you to talk to a pharmacist - i would talk to your healthcare provider. they are the ones that have your medical history.