I've been using aaPanel for several months now, and I'm hosting .apk, .xapk, .zip, and .apks files on my server. Unfortunately, many people are hotlinking these files to their websites, which I'd like to prevent. Specifically, I want to restrict access to these files so that they can only be downloaded from specific domains, such as example.com and example.net.
If someone attempts to hotlink to these files on their website or tries to directly access the URLs listed below, I want it to redirect them to the homepage of www.example.com:
Example URL: https://files.example.com/appname/app-v2.3.apk
I've already attempted to use the hosting protection option within aaPanel, but it doesn't seem to be working. When I enable it, the .apk files are not downloading from the allowed domains, including direct links.
My aaPanel version is v6.8.30, and I'm running Ubuntu 22.04.
I would appreciate assistance in resolving this issue.
Thank you for your support.