API Error with Homepage Dashboard

I have successfully setted up syncthing on windows 11 and working fine. I try to add it to my Hompage dashboard got api error. when i try to access the url “http://127.0.0.1:8384/rest/svc/report” it shows CSRF Error

API Error: HTTP Error
URL: http://127.0.0.1:8384/rest/svc/report

yaml config

- Syncthing:
        icon: mdi-sync
        widget:
          type: customapi
          method: GET
          url: http://127.0.0.1:8384/rest/svc/report
          headers:
            X-API-Key: myapikey
          mappings:
            - field: totMiB
              label: Stored (MB)
              format: number
            - field: numFolders
              label: Folders
              format: number
            - field: totFiles
              label: Files
              format: number
            - field: numDevices
              label: Devices
              format: number

i have disabled auth also.

I think csrf is only used when there is no api key, so makes sense that it fails via browser, unless you’re accessing it via curl with the header set, its expected. Not sure why it doesn’t work in your dashboard thing. Suspect the api key is wrong.

Im sure and double checked api key and its correct one. Homepage dasboard don’t support curl. The only way to access it via http

I’m not suggesting you access it using curl, I’m saying your browser attempt that is flawed as you are not setting the header when accessing from the browser and should use curl to understand why it doesn’t work.

Going through a similar bug, I can curl the address with the API but can’t get the error while accessing it via homepage. Seems like a homepage issue though?