Closed sm2017 closed 5 years ago
What replaceResponse do exactly? https://github.com/Azard/egg-oauth2-server/blob/master/lib/server.js#L15-L31
replaceResponse
Why we cannot do simply const response = new Response(ctx.response); instead of const response = new Response(replaceResponse(ctx.response)); ?
const response = new Response(ctx.response);
const response = new Response(replaceResponse(ctx.response));
As the comment say
// copy for response.headers.hasOwnProperty is undefined case // https://github.com/oauthjs/node-oauth2-server/pull/486
What
replaceResponse
do exactly? https://github.com/Azard/egg-oauth2-server/blob/master/lib/server.js#L15-L31Why we cannot do simply
const response = new Response(ctx.response);
instead ofconst response = new Response(replaceResponse(ctx.response));
?