Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
WP Plugins
Redis Page Cache
Commits
3e4939c0
Commit
3e4939c0
authored
Feb 27, 2014
by
Erick Hitter
Browse files
Remove a seemingly unnecessary check on the request, which broke processing of POST requests.
parent
6cda9635
Changes
1
Hide whitespace changes
Inline
Side-by-side
index-wp-redis.php
View file @
3e4939c0
...
...
@@ -91,18 +91,6 @@ function wp_redis_cache_request_has_secret( $secret ) {
return
false
!==
strpos
(
$_SERVER
[
'REQUEST_URI'
],
"refresh=${secret}"
);
}
/**
* Determine if request is from a server other than the one running this code
*
* @return bool
*/
function
wp_redis_cache_is_remote_page_load
(
$current_url
,
$server_ip
)
{
return
(
isset
(
$_SERVER
[
'HTTP_REFERER'
]
)
&&
$_SERVER
[
'HTTP_REFERER'
]
==
$current_url
&&
$_SERVER
[
'REQUEST_URI'
]
!=
'/'
&&
$_SERVER
[
'REMOTE_ADDR'
]
!=
$server_ip
);
}
/**
* Set proper IP address for proxied requests
*
...
...
@@ -278,7 +266,7 @@ try {
}
// Refresh request, deletes cache: either manual refresh cache by adding ?refresh=secret_string after the URL or somebody posting a comment
if
(
wp_redis_cache_refresh_has_secret
(
$wp_redis_cache_config
[
'secret_string'
]
)
||
wp_redis_cache_request_has_secret
(
$wp_redis_cache_config
[
'secret_string'
]
)
||
wp_redis_cache_is_remote_page_load
(
$wp_redis_cache_config
[
'current_url'
],
$wp_redis_cache_config
[
'server_ip'
]
)
)
{
if
(
wp_redis_cache_refresh_has_secret
(
$wp_redis_cache_config
[
'secret_string'
]
)
||
wp_redis_cache_request_has_secret
(
$wp_redis_cache_config
[
'secret_string'
]
)
)
{
if
(
$wp_redis_cache_config
[
'debug'
]
)
{
$wp_redis_cache_config
[
'debug_messages'
]
.
=
"<!-- manual refresh was required -->
\n
"
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment