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

Fix for #13 and adds test target and notes. #18

Merged
merged 1 commit into from
Sep 17, 2020
Merged

Conversation

gwsii
Copy link
Member

@gwsii gwsii commented Sep 11, 2020

Two changes were necessary to fix URL signing.

1 - replace all variables in the URL with those provided in the 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

@gwsii gwsii merged commit f6ed8bf into master Sep 17, 2020
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

Successfully merging this pull request may close these issues.

None yet

1 participant