Web API showing "Could not connect to the IPFS API"

I have installed kubo_v0.28.0_linux-arm64.tar.gz to a Raspberry Pi 3B and it seems to be running OK, however when I try to access it from another PC using http://raspberrypi3b:5001/webui I get an error saying “Could not connect to the IPFS API”. I have tried everything it suggests and tried a lot of ideas found from googling it but I can’t figure out why it doesn’t work.

EDIT: I have solved the problem, I just needed to make sure the daemon was running properly, and then I followed the instructions on the page it was giving me. I had to run:

ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin ‘[“http://raspberrypi3b:5001”, “http://localhost:3000”, “”, “https://webui.ipfs.io”]’


ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods ‘[“PUT”, “POST”]’