How would I keep a flying player inside a path?

If you've played Starfox you might know what I'm talking about. I have an obvious path the player (who can fly) is supposed to take. The problem is that the top is open, so if they want they can fly out into nothingness. I need to constrain them to only go up a certain height from the ground. How would I do this?

I'd assume an invisible wall would be the easiest/most common method.

Just use a collider (box or mesh) and remove the renderer component