"""Absolute URL builder for links sent outside the browser (SMS, email) —
uses the same settings.SITE_BASE_URL already relied on by
market/order_emails.py::_order_link (defaults to https://pickkermarket.com)
instead of request.build_absolute_uri(), which depends on the live server
correctly reporting its own scheme/host. Apache/Passenger deployments
(cPanel) often get that wrong — silently producing plain http:// links on
an https-only site that then fail when tapped. Verification and
password-reset links were the one major link-sending path still using
request.build_absolute_uri() directly; this brings them in line with the
pattern order notifications already use."""

from django.conf import settings


def absolute_url(request, path):
    return settings.SITE_BASE_URL.rstrip('/') + path
