Change record status: 
Project: 
Description: 

The fast_404.exclude_paths key in the system.performance configuration is deprecated in drupal:12.1.0 and will be removed in drupal:13.0.0. Use fast_404.paths instead.

The fast 404 subscriber runs after routing. It only responds when a NotFoundHttpException is thrown. Routes that generate content, such as image style derivatives, are not affected.

The exclude_paths key only chooses between the full 404 page and the minimal one for paths that match fast_404.paths. The same result can be achieved with a regular expression in fast_404.paths.

New sites no longer include the exclude_paths key. An update removes the key if it has the default value. If it has a custom value, it is kept and the update displays a warning.

As long as the key has a value, Drupal still respects it and triggers a deprecation warning.

Before

$config['system.performance']['fast_404']['exclude_paths'] = '/\/docs\//';

After

Remove the line from settings.php. To make a path return the full 404 page, exclude it in fast_404.paths. This example excludes /docs/ using a negative lookahead:

$config['system.performance']['fast_404']['paths'] = '/^(?!\/docs\/).*\.(?:txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i';

You can also disable fast 404s with fast_404.enabled.

Impacts: 
Site builders, administrators, editors
Module developers