How to disable some api called by remote http(not command) in private network

I make a ipfs private network, I want to disable some api called by remote http (not command), like pin/ls …, I don’t want to expose the file list. What should I do

Private networks don’t expose the API by default, just leave it on localhost.

We have exposed ipfs port 5001 for upload and download etc.