How to make a camera rotation limit when in a hiding spot

I want to make a the bp_firstPersonCharacter’s camera have a limit on how far it can rotate when it hides in a locker, and I can’t figure out how, I am trying to make it where the camera is limited to looking mostly forward towards the door of the locker, but lockers can be facing any direction, I don’t want it to only limit the camera based on a fixed direction, is there any way I can do this?