-
Notifications
You must be signed in to change notification settings - Fork 8
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 web backend to redirect DKG setup requests #153
Conversation
Pull Request Test Coverage Report for Build 2567751785
💛 - Coveralls |
web/backend/src/Server.ts
Outdated
// update the payload. | ||
const regex = /\/evoting\/services\/dkg\/actors$/; | ||
// in case this is a DKG setup request, we must update the payload. | ||
const regex = /\/evoting\/services\/dkg\/actors/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const regex = /\/evoting\/services\/dkg\/actors/; | |
const regex = /\/evoting\/services\/dkg\/actors$/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But that won't match a DKG setup request with the '$' at the end will it (since it's an end of string) and the setup still has the {ElectionID} at the end ie. actors/{ElectionID} ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes you're right, /\/evoting\/services\/dkg\/actors\/.*$/
would be the one then. Just to be as much explicit as possible.
Kudos, SonarCloud Quality Gate passed! |
Pull Request Test Coverage Report for Build 2567751785Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 2567659463Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
1 similar comment
Pull Request Test Coverage Report for Build 2567659463Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
I am absolutely not sure if this is correctly written !
But currently DKG setup requests are not redirected, they use the default proxy, the idea is to redirect them to the correct proxy (the one provided in the input json).
As the
regex
used to check if it's an initialisation request does not match the setup i.econst regex = /\/evoting\/services\/dkg\/actors$/
does not match with the setup endpoint:/api/evoting/services/dkg/actors/${ElectionID}