- last update
over 1 year ago 4 pass - π―π΄Jordan Ahmad Alyasaki
The problem happened again to me, it's fixed with Patch Number 3, we need to first check if the URL is external. There's no need to send an external path to the Route service, For example, "mysite.com/media/news" would redirect to "example.com/news" if there's a route for "/news" in Drupal the Route service will redirect users to the same domain, ignoring the external path, That's why it's crucial to check if the path is external first. If it's not external, we can then send it to the route match. If there's no resource, just return a 404 status code.
- last update
over 1 year ago 4 pass - πΊπΈUnited States jeffschuler Boulder, Colorado
Keep the
return
after finding an external URL, otherwise the path will continue to be parsed and (depending on the structure of the URL) not always end up including the $redirects_trace (from
,to
, andstatus
) information.Reverted back to the original comment because I believe it's more informative and correct than what it was recently changed to.
- π΅πͺPeru krystalcode
Changes:
- Thereturn
as pointed out in #7.
- AddedisExternal
, I think it's useful for clients.
- AddedisHomePage
as well for consistency.
- Minor optimization when creating the path.
- Setting the status code whenResourceNotFoundException
occurs is not needed, it's already 404 set inPathTranslatorEvent