I would probably do this at the app level