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

Type regression (express.Request -> http.IncomingMessage) #692

Closed
elado opened this issue Jan 7, 2022 · 1 comment · Fixed by #700 or #882
Closed

Type regression (express.Request -> http.IncomingMessage) #692

elado opened this issue Jan 7, 2022 · 1 comment · Fixed by #700 or #882

Comments

@elado
Copy link

elado commented Jan 7, 2022

Describe the feature you'd love to see

#603 reworked some types, but changed

// Request is extending express.Request
onProxyReq?(proxyReq: http.ClientRequest, req: Request, res: Response): void;

to

export type OnProxyReqCallback = (
  proxyReq: http.ClientRequest,
  req: http.IncomingMessage,
  res: http.ServerResponse,
  options: httpProxy.ServerOptions
) => void;

this changed req: express.Request to req: http.IncomingMessage which loses some properties like secure, query etc.

Additional context (optional)

No response

@bliles
Copy link

bliles commented Jan 14, 2022

This is a problem for me as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants