1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-14 01:19:44 +01: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
commit 4ce699b380
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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