Hotlink Protection (SKINS)(TEMPLATES)

Version 1.60.0


GUI for hot-link protection, so Users don't need to manually edit their .htaccess files. Universal interface also setup openlitespeed and nginx configs correctly. CMD_HOTLINK, CMD_API_HOTLINK Users will be able to access the GUI in Enhanced skin via: /CMD_HOTLINK? ================= SKINS New file: enhanced/user/hotlink.html Appended file: enhanced/files_user.conf CMD_HOTLINK=user/hotlink.html URL added to: enhanced/user/show_domain.html below "Site Redirect" ================= LANG Edited: enhanced/lang/en/user/show_domain.html LANG_HOTLINK_PROTECTION=Hotlink Protection NEW: enhanced/lang/en/user/hotlink.html ================= TEMPLATES in: /usr/local/directadmin/data/templates Hotlink code: hotlink.apache.conf hotlink.openlitespeed.conf hotlink.nginx.conf Added to the following templates using this token: |HOTLINK_PROTECTION| virtual_host2.conf virtual_host2_secure.conf virtual_host2_sub.conf virtual_host2_secure_sub.conf nginx_server.conf nginx_server_secure.conf nginx_server_sub.conf nginx_server_secure_sub.conf openlitespeed_vhost.conf ================= JSON ---------------- Get data: CMD_HOTLINK? Where the "data" array is the current list of allowed referer urls. Standard table rules, which can be sorted/search, etc. The "options" relate to tokens usend in Enhanced to enabling checkboxes, radio-boxes and input fields. The "MY_DOMAINS_LIST" refers to the "Allow my domains to the list" button, which would be used to add a bulk-list of items to the list, for adding. See the data/skins/enhanced/user/hotlnk.html for javascript used to do this. Output: { "data": { "0": { "url": "http://*" }, "1": { "url": "" }, "2": { "url": "https://*" }, "3": { "url": "" }, "info": { "columns": { "url": "1" }, "current_page": "1", "ipp": "50", "rows": "4", "total_pages": "1" } }, "options": { "HOTLINK_ALLOW_BLANK_REFERER_CHECKED": "checked", "HOTLINK_ENALBED_CHECKED": "checked", "HOTLINK_PROTECT_FILES": "jpg,jpeg,gif,bmp,ico,svg,png", "MY_DOMAINS_LIST": "\\n\\nhttps://*\\nhttp://*\\n\\n\\nhttps://*\\nhttp://*\\n", "REDIRECT_TO_FORBIDDEN_CHECKED": "", "REDIRECT_TO_URL_CHECKED": "checked", "REDIRECT_URL": "" } } --------------- Delete URLS: action: CMD_HOTLINK method: POST action=multiple select0= (select1= --------------- Save settings/URLs action: CMD_HOTLINK method: POST action=save enabled=yes|no - checkbox, thus absence implies no: Used for on/off switch into webserver configs. allow_blank_referer=yes|no - checkbox: When on, a blank referer (direct URL in browser without click) is allowed. urls=<list> - list of URLs, with http/https, one url per line. May contain trailing /file.html if desired. files=<list> - list of file extensions, comma separated, no spaces (DA will trim spaces) to apply to hotlink protection. RETURN value is standard dynamic output success|error:text

Interested to try DirectAdmin? Get a 30-day Free Trial!