[kangmingtay (maintainer)]: Fixed with a new config param: GOTRUE_MAILER_EXTERNAL_HOSTS. Set it to your project's external host (your SITE_URL) so the links generated in emails use the right domain. If your self-hosted Supabase emails link to http://kong, this setting is the fix, no code changes needed.

_Source: gh:supabase/auth#1228 (Supabase Auth)_