1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 19:30:25 +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(
'$secure_link_expires',
'$uri',
'$remote_addr'
'$remote_addr',
'$host',
);
static function supported_variables() {
@@ -37,7 +38,8 @@ class NginxSecureLinkMd5Decorator implements SecureLinkDecorator
array(
$expiry,
$url_parts['path'],
$_SERVER['REMOTE_ADDR']
$_SERVER['REMOTE_ADDR'],
$url_parts['host'],
),
$prefs['download_security_expression']
);