the nginx philosophy is fairly anti-DRY. Any attempt to use if statements might be rather fraught. I wouldn't worry about it too much.