From e81fb7e81eddf231866b619f95dfeba182cd6547 Mon Sep 17 00:00:00 2001
From: Till Hildebrandt
Date: Fri, 29 Nov 2019 15:27:17 +0100
Subject: [PATCH] Bugfix - matching blacklisted_paths on request_target instead
of uri.
---
src/CachePlugin.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/CachePlugin.php b/src/CachePlugin.php
index 805d361..b72dbbb 100644
--- a/src/CachePlugin.php
+++ b/src/CachePlugin.php
@@ -274,7 +274,7 @@ protected function isCacheable(ResponseInterface $response)
private function isCacheableRequest(RequestInterface $request)
{
foreach ($this->config['blacklisted_paths'] as $not_to_cache_path) {
- if (1 === preg_match('/'.$not_to_cache_path.'/', $request->getUri())) {
+ if (1 === preg_match('/'.$not_to_cache_path.'/', $request->getRequestTarget())) {
return false;
}
}
|