Fix deny_all_requests_except_allowed of AddressableUrlValidator
What does this MR do and why?
This is a backport of !144488 (merged) to 16-9-stable-ee.
ref https://gitlab.com/gitlab-org/gitlab/-/issues/440842#note_1776821184
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Furkan Ayhan