I use Django in production.
I see that if an unauthenticated user accesses an exposed API - the server will return HTTP 401 Unauthorized.
If the user will access a non-existing API (with or without authentication) - the server will return 404 Not found.
This seems to me like a bad security practice and allows an attacker to find the server's exposed APIs.
Is there a way to change that so both will return the exact same result (I think 401 is the best practice, no?)