Dreaded CORS issue on netlify function

That seems like it should work to me, but looking at this thread there may be some limitations with rewrites to functions I wasn’t aware of: