WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 0a02c7c

Browse files
committed
docs: less talking
1 parent c78be5e commit 0a02c7c

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/index.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,9 @@ const GraphQLSSEPlugin: PostGraphilePlugin = {
199199
return req;
200200
}
201201

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

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

0 commit comments

Comments
 (0)