mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
fix: Ignore non-HTML responses in storePreviousURL
This commit is contained in:
parent
f012cc7f18
commit
fd19d90a83
@ -1031,6 +1031,11 @@ class CodeIgniter
|
||||
return;
|
||||
}
|
||||
|
||||
// Ignore non-HTML responses
|
||||
if (strpos($this->response->getHeaderLine('Content-Type'), 'text/html') === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
// This is mainly needed during testing...
|
||||
if (is_string($uri)) {
|
||||
$uri = new URI($uri);
|
||||
|
Loading…
x
Reference in New Issue
Block a user