When a visitor post comment.The Nginx Helper plugin only purge pages either on http or https.(depends on what scheme the visitor used)
We all know the http&https content is different.So there is no point to set a same key in ngx cache setting.
I tried to patch the plugin function myself by using these code:
function purgeUrl( $url, $feed = true ){
$this->purgeUrl1($url, $feed);
$pre_parse = parse_url($url);
if ( $pre_parse[ 'scheme' ] == "https" ){
$this->purgeUrl1(str_replace("https","http",$url),$feed);
}else{
$this->purgeUrl1(str_replace("http","https",$url),$feed);
}
}
function purgeUrl1( $url, $feed = true ) {
...
It’s work perfectly when visitor post comment via http.But when visitor post comment via https,these codes will cause duplicate comment and die with ‘Duplicate comment detected’.
Pls consider this situation and fix this bug.