Replies: 3 comments 7 replies
-
|
I think this is preferred, but you need to disable the upstream request body parser to be able to let the module do it's thing. Your JSON body shouldn't work. input = new Request(currentUrl.href, {
method: 'POST',
headers: Object.entries(req.headersDistinct).reduce(
(acc, [key, values]) => {
for (const value of values!) {
acc.append(key, value)
}
return acc
},
new Headers(),
),
body: req,
duplex: 'half',
}) |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the fast help! Not sure if it is ok to report here: it seems a Request as input works only with We currently rewrite the request body parameters as URLSearchParams, as this seems the most feasible method with our codebase. Disabling the request body parser is not possible for us at this moment. |
Beta Was this translation helpful? Give feedback.
-
|
on this topic - since I am also parsing my request separately before invoking authorizationCodeGrant... I don't want to pass the entire request since it may contain sensitive information (client ip, proxies, client cert, ...) Happy to continue discussing options here |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently I'm using the
authorizationCodeGrantand getting a response from the server as aresponse_modeform_postwith express 4.x.x.The documentation for authorizationCodeGrant says to provide a
currentUrlas either aURLor aRequest.As a
form_posthas noURLSearchParams, but abodywith the parameters, I can either construct acurrentUrlwith search parameters from the body:and then use this
currentURLwith the constructedURLSearchParams.As an alternative I can construct a
Request:and use this
requestin the call.Both methods "work", however I'm don't know if there is a better method or if one method is preferred. Advice is very much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions