I've worked in aviation for over 25 yrs always in the mtc field, worked for delta and southwest and the navy,...
your shaving cream must adhere to 3.4 oz (100ml) or less rule
You may carry liquids, gels and aerosols in your carry-on bags only if they adhere to the 3-1-1 rule: containers must be 3.4 ounces or less; stored in a 1 quart/liter zip-top bag; 1 zip-top bag per person, placed in the screening bin. Larger amounts of non-medicinal liquids, gels, and aerosols must be placed in checked baggage.
hope this helps0 comments
3 other experts are backing this answer