TanStackT
TanStack7d ago
6 replies
safe-amethyst

Add header to every POST

I have CloudFront sitting in front of a function URL on AWS.
This means that post requests need to have a x-amz-content-sha256 header added.

Is there a sensible way to intercept fetch to always add this on POST?

I'm currently using clientmiddleware but need to remember to add this on every relevant server function and global middleware doesn't support client middleware
Was this page helpful?