1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-11 09:14:58 +02:00

Fix issue where the config.maxUrlSegments wasn't working, plus add new config.longUrlResponse where you can define the http response that should be used when there is an overflow of URL length, segments, or depth.

This commit is contained in:
Ryan Cramer
2024-12-20 15:14:37 -05:00
parent 9bc02399e5
commit 1fc3cf414a
4 changed files with 58 additions and 19 deletions

View File

@@ -985,7 +985,7 @@ $config->protectCSRF = true;
* @var int
*
*/
$config->maxUrlSegments = 4;
$config->maxUrlSegments = 20;
/**
* Maximum length for any individual URL segment (default=128)
@@ -1004,7 +1004,23 @@ $config->maxUrlSegmentLength = 128;
* @var int
*
*/
$config->maxUrlDepth = 30;
$config->maxUrlDepth = 30;
/**
* Long URL response (URL depth, length or segments overflow)
*
* HTTP code that ProcessWire should respond with when it receives more URL segments,
* more URL depth, or longer URL length than what is allowed. Suggested values:
*
* - `404`: Page not found
* - `301`: Redirect to closest allowed URL (permanent)
* - `302`: Redirect to closest allowed URL (temporary)
*
* @var int
* @since 3.0.243
*
*/
$config->longUrlResponse = 404;
/**
* Pagination URL prefix