Skip to content

Pass all querystring params to a redirect #2251

Answered by the10thWiz
letto4135 asked this question in Questions
Discussion options

You must be logged in to vote

From a security perspective, this is likely not a good idea, which is why Rocket makes it more difficult.

The guide has a section on collecting the remaining query parameters: https://rocket.rs/v0.5-rc/guide/requests/#trailing-parameter. For your case, you likely want to just collect them into a HashMap, and write them to a url. However, if you would like to do any kind of validation against these before passing them on, I recommend creating a custom struct that implements FromForm with all of the fields to handle validation.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by letto4135
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants