I don't see anything wrong initially. Can you also test with something like postman? It'll allow you to control the headers etc.. that you send.
You can also compare to what I have here and see if that helps: https://github.com/marsara9/lemmy-search/blob/b6c88355aba49abca52862473650526821ee165a/server/src/api/lemmy/fetcher.rs#L123