Yup that’s not too hard:
https://github.com/discourse/discourse/commit/298098745ee43128b18918b161f9669c04dde212