What I am trying to do: I have syncthing on my mobile device and my laptop, when I open emacs, I want it to do a rescan from my phone’s side and sync all changed files to my laptop. I have it setup to sync from my laptop to my phone with this terminal command when I close emacs:
curl -X POST -H “X-API-Key: {{API REDACTED}}” http://localhost:8384/rest/db/scan
and it works perfectly but it would be even better for it to sync the stuff I edited on my phone to emacs when I open it but everytime I put the curl -X POST -H “X-API-Key: {{PHONE API REDACTED}}” http://localhost:8384/rest/db/scan
it just gives me a CSRF error, I have been trying to get this to work for 2 days now, any help?