Closed gwsii closed 4 years ago
Two changes were necessary to fix URL signing.
1 - replace all variables in the URL with those provided in the context
context
// Perform variable substitution in url. const varNames = Object.getOwnPropertyNames(context.vars) const actualUrl = varNames.reduce((accUrl, name) => { return accUrl.split(`{{${name}}}`).join(context.vars[name]) }, url.split(' ').join(''))
2 - include the query string in the request path
request.path = targetUrl.pathname + targetUrl.search
Two changes were necessary to fix URL signing.
1 - replace all variables in the URL with those provided in the
context
2 - include the query string in the request path