Skip to content

Content-Type header not being set from plugin #1891

Discussion options

You must be logged in to vote

Solved all of this by doing:

event.respondWith(
      new Response(JSON.stringify(response), {
        status: response.code,
        headers: {
          "Content-Type": "application/json",
        },
      })
    );

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ngregrichardson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant