How keep aspect ratio between min and max?

How make do you guys keep aspect ratio while resizing window? If i run game in design size 720x1280 it’s looks good. But if i try resize window there blue gaps appear, i wanna fill gaps.

Something like:

  1. Viewport height always match screen size
  2. Viewport width always extend to screen size but between 6:16 - 12:16 ratios

For example for 1280px height:

min viewport width = 1280 * 6/16 = 480
max viewport width = 1280 * 12/16 = 960

If you use a camera component you can set the Orthographic Mode to Auto Cover: