How to redirect a user to a mobile app (without browser) using Django (Universal Link / App Link) with .well-known configuration?

I am working on a Django-based web application, and I need to implement a feature where users are redirected to a mobile app directly (without using a browser) when they visit a specific URL. I want to use Universal Links (for iOS) or App Links (for Android) and ensure the redirect happens seamlessly.

My setup:
URL pattern: I am using a URL like /api/app/login/str:session_token/.
Mobile app URL: I want to redirect users to a custom scheme URL like myapp://path/to/page/.
Current view: This is my view that tries to handle the redirection:

from django.http import HttpResponseRedirect
from django.views import View

class MobileRedirectView(View):
    def get(self, request, *args, **kwargs):
        # Custom mobile app URL (Universal Link for iOS or App Link for Android)
        mobile_app_url = "myapp://path/to/page/"

        # Redirecting to the mobile app
        return HttpResponseRedirect(mobile_app_url)

The problem:
When trying to redirect to the mobile app URL using the custom scheme (myapp://), I get this error:
django.core.exceptions.DisallowedRedirect: Unsafe redirect to URL with protocol ‘myapp’.

I know that Django by default only allows redirects to http:// or https:// URLs, but I need to allow custom schemes like myapp://.

Goal: I want the redirection to happen without using a browser (directly into the mobile app), and I also want to use Universal Links / App Links for iOS and Android respectively.

Additional Context:
I have set up .well-known files to configure my app to handle these links on mobile. The .well-known configuration for my iOS and Android apps looks like this:
For iOS (inside apple-app-site-association):

{
  "applinks": {
    "details": [
      {
        "appID": "TEAM_ID.com.myapp",
        "paths": ["/path/to/page/*"]
      }
    ]
  }
}

For Android (inside assetlinks.json):

{
  "applinks": {
    "details": [
      {
        "appID": "com.myapp",
        "paths": ["/path/to/page/*"]
      }
    ]
  }
}

How can I allow a redirect to a custom scheme like myapp:// in Django, while ensuring it’s handled directly by the mobile app (iOS/Android) without using a browser?
Should I configure Django settings to allow custom scheme redirects? If yes, how?
Do I need to modify the Django view or use JavaScript to trigger the redirect in a way that avoids the browser?
Can I use .well-known files to ensure that iOS and Android correctly handle these links without any issues?
Is there a better approach to achieve this using Universal Links and App Links in a Django app, ensuring the user is redirected directly to the mobile app (not through the browser)?
Additional Configuration:
Is there any special Nginx or other server-side configuration I need to set up to allow these kinds of redirects on the server?
Any help would be greatly appreciated!

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật