But Duolingo is correct.
Did you know that verbs ending in '-iren', such as "rasieren" or "inhalieren", are conjugated in the past tense without a leading 'ge-'?
"Ich habe mich gestern rasiert" is correct,
"Ich habe mich gestern gerasiert" is wrong,
"Ich habe mich gestern schnitten" is wrong,
"Ich habe mich gestern geschnitten" is correct.
German is such a great and easy language!