Get a 404 page already when calling with trailing slash My SEO agency complains about the following:

Let's assume the URL http://example.com/foo leads to a non-existing page. Then Drupal correctly responds with a 404.

Now,


if I call http://example.com/foo/ (with a trailing slash),
Drupal first redirects to http://example.com/foo (without trailing slash)
and only then responds with 404.


The SEO agency says that this way I loose "crawl equity".

The desired behaviour would be that


I call http://example.com/foo/
and immediately get a 404 page.


What is the best way to achieve this?
Most likely you have a written rule htaссess 301 redirect. Possibly it is written in the code or via modules.