Skip to content

Commit

Permalink
koa-openapi: forward rejection from securityMiddleware (fixes kogosof…
Browse files Browse the repository at this point in the history
  • Loading branch information
medfreeman authored Nov 3, 2021
1 parent c20cbc8 commit a9927b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/koa-openapi/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ function createAssignApiDocMiddleware(apiDoc, operationDoc) {

function createSecurityMiddleware(handler) {
return function securityMiddleware(ctx: Context) {
handler.handle(ctx, (err, result) => {
return handler.handle(ctx, (err, result) => {
if (err) {
if (err.challenge) {
ctx.set('www-authenticate', err.challenge);
Expand Down

0 comments on commit a9927b9

Please sign in to comment.