Turn a Node request into what verifyDPoPRequest reads.
Headers come from headersDistinct, because req.headers keeps only the
first of two Authorization headers and a duplicate would go unseen. Only
Authorization and DPoP are copied.
The path is url if given, else Express's originalUrl, else req.url.
Pass it when something in front of you rewrote req.url: under
koa-mount, ctx.req.url has lost the mount prefix and only
ctx.originalUrl still has the path the client signed.
Turn a Node request into what
verifyDPoPRequestreads.Headers come from
headersDistinct, becausereq.headerskeeps only the first of twoAuthorizationheaders and a duplicate would go unseen. OnlyAuthorizationandDPoPare copied.The path is
urlif given, else Express'soriginalUrl, elsereq.url. Pass it when something in front of you rewrotereq.url: underkoa-mount,ctx.req.urlhas lost the mount prefix and onlyctx.originalUrlstill has the path the client signed.