Problem/Motivation
If a site is implementing a RestResource, the responses are affected negatively (returning a 404 when a 403 with a message is expected).
Steps to reproduce
Proposed resolution
Add configuration to disable the redirection on a set of paths
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork m4032404-3358555
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
albert volkman commentedComment #4
hotwebmatter commentedThis seems correct.
I will note, however, that the behavior appears to be sticky until caches are cleared.
So ... either invalidate caches for the specified routes when config is saved, or take the lazy route and add some text saying "Rebuild caches after saving configuration."
Does that make sense?
Comment #5
albert volkman commented@hotwebmatter nice catch! Latest commit should handle that.
Comment #6
hotwebmatter commentedTested Merge request !3
With unpatched module,
http://d9.lndo.site/admin/config/system/m4032404is redirected to 404, whether or not the "Enforce on Admin Only" boolean is setTRUE.After applying patch, if no Pages are specified, the default behavior remains the same, and
http://d9.lndo.site/admin/config/system/m4032404is redirected to 404, whether or not the "Enforce on Admin Only" boolean is setTRUE.After specifying
/admin/config/system/m4032404in Pages, the following behavior occurs:Reviewed and tested by the community.
Comment #9
elc commentedFollow up #3529941: Use ConditionManager instead of custom code
Comment #10
elc commentedIf this patch was used on a production site, it will need the update introduced in #3530038: Update deprecated config for Method to bypass redirection