1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 21:57:51 +02:00

Merge pull request #4011 from Deltik/fix-4010

Support NGINX $host in Downloads hotlink protection
This commit is contained in:
Cameron
2020-07-02 10:55:31 -07:00
committed by GitHub

View File

@@ -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']
); );