Skip to content

Commit

Permalink
docs: less talking
Browse files Browse the repository at this point in the history
  • Loading branch information
enisdenjo committed Apr 14, 2022
1 parent c78be5e commit 0a02c7c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,9 @@ const GraphQLSSEPlugin: PostGraphilePlugin = {
return req;
}

if (options.enableCors)
addCORSHeaders(
// we use the node response (instead of PostGraphileResponse) because graphql-sse
// will append more headers down the read and flush them on its own
res,
);
if (options.enableCors) {
addCORSHeaders(res);
}

// Just a CORS preflight check
if (req.method === 'OPTIONS') {
Expand Down

0 comments on commit 0a02c7c

Please sign in to comment.