mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
Merge pull request #4011 from Deltik/fix-4010
Support NGINX $host in Downloads hotlink protection
This commit is contained in:
@@ -9,7 +9,8 @@ class NginxSecureLinkMd5Decorator implements SecureLinkDecorator
|
|||||||
public static $SUPPORTED_VARIABLES = array(
|
public static $SUPPORTED_VARIABLES = array(
|
||||||
'$secure_link_expires',
|
'$secure_link_expires',
|
||||||
'$uri',
|
'$uri',
|
||||||
'$remote_addr'
|
'$remote_addr',
|
||||||
|
'$host',
|
||||||
);
|
);
|
||||||
|
|
||||||
static function supported_variables() {
|
static function supported_variables() {
|
||||||
@@ -37,7 +38,8 @@ class NginxSecureLinkMd5Decorator implements SecureLinkDecorator
|
|||||||
array(
|
array(
|
||||||
$expiry,
|
$expiry,
|
||||||
$url_parts['path'],
|
$url_parts['path'],
|
||||||
$_SERVER['REMOTE_ADDR']
|
$_SERVER['REMOTE_ADDR'],
|
||||||
|
$url_parts['host'],
|
||||||
),
|
),
|
||||||
$prefs['download_security_expression']
|
$prefs['download_security_expression']
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user