Skip to content

Commit a5bfb3c

Browse files
committed
added missing CORS preflight check
1 parent 1d36474 commit a5bfb3c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/grpc-js/src/server.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,6 +1377,10 @@ export class Server {
13771377
this.callTracker.addCallStarted();
13781378
channelzSessionInfo?.streamTracker.addCallStarted();
13791379

1380+
if (this._respondWithCORS(stream, headers)) {
1381+
return;
1382+
}
1383+
13801384
if (!this._verifyContentType(stream, headers)) {
13811385
this.callTracker.addCallFailed();
13821386
channelzSessionInfo?.streamTracker.addCallFailed();

0 commit comments

Comments
 (0)