Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: HTTP: ending response at middleware results in no log entry for request #590

Open
alpharder opened this issue Jul 6, 2024 · 0 comments

Comments

@alpharder
Copy link
Contributor

Consider the following middleware:

import { HttpMiddleware, HttpRequest, HttpResponse } from '@deepkit/http';

export class AuthenticationMiddleware implements HttpMiddleware {
  constructor() {}

  async execute(
    request: HttpRequest,
    response: HttpResponse,
    next: (err?: unknown) => void,
  ) {
    response.statusCode = 403;
    response.end();
  }
}

Actual result

  • Controller routes using this middleware are NOT executed
  • Log entry for such request is NOT created

Expected result

  • Controller routes using this middleware are NOT executed
  • Log entry for such request GETS created
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant