Disable API requests

How I can disable some requests via API?

E.g. I don’t want to use

  • /user/followers
  • /user/following
  • /user/keys
    etc

Can I prevent to call these requests?

Did you find the way to do this? I would like to disable the API completely.

For example GET requests like:
https://gitea.example.com/api/v1/users/search

It is rather easy to disable the whole API. Simply set " `ENABLE_SWAGGER=false" in the ini file.
See

As for disabling only parts, the only way I can think of is using a proxy and filtering the URL. For proxies Pound, nginx or Apache spring to mind.

We are using Apache for UI access and Pound for API access and that works.