Mime
Direct Link Protection (Hotlink)
Enable hotlink protection
This function adds hotlink protection for a site. Hotlink protection will redirect users to another URL if they navigate to a file with a specified extension, but an allowed URL did not refer them.
Important:
When you disable the WebServer role, the system disables this function.
get/Mime/add_hotlink
Query parameters
extensionsstring required
File types to hotlink protect.
Note:
To protect multiple file types, use a comma-separated list.
redirect_urlstring url required
Example:http://redirect.example.com/
The URL to which the system sends hotlinkers.
urlsstring required
The site to hotlink protect.
Note:
To protect multiple URLs, separate each URL with a newline character.
allow_null0 | 1
Example:1
Whether the domain allows hotlinks.
- 1 - Allows.
- 0 - Does not allow.
Response
HTTP Request was successful.
Example response
{
"apiversion": 3,
"func": "add_hotlink",
"module": "Mime",
"result": {
"status": 1
}
}