Adding headers to Response.json

As the title suggests, would it be possible to add CORS headers to the response when using Response.json?
1 Reply
kian
kian16mo ago
Yes, just add them the same as a normal Response - in the second ResponseInit param

Did you find this page helpful?