Just added this in master:
https://github.com/discourse/discourse/commit/15c7e01b904a91da51968acecfb543dd6555dccb