A quick internet search suggests 36 weeks (eight months), which is well into the third trimester, is the most common start of restrictions, and many airlines will accept a doctor's note the woman is low risk even past that. It was a 2008 election blip when the media got ahold of Sarah Palin flying while in labor because she wanted her special-needs baby delivered by the medical team that had prepared for him, which suggests even the written restrictions in airline policy are not consistently enforced.
I mean, sure, maybe in the ensuing lawsuit they could be like hey, her doctor said it was cool, but it doesn't change the fact that there's a baby being born on an airplane in transit. Nobody wants that, airlines will shut that down, and it's not discrimination, it's just a good decision.