Nextcloud may omit default ports in the login_url (e.g. http://app instead of http://app:80). Extract just scheme+hostname from NEXTCLOUD_HOST for the URL replacement check. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>