Skip to content
Discussion options

You must be logged in to vote

There are at least three patterns I found for this.

  1. Infer the URL from the action request.url and route params
  2. Pass the URL as an hidden input in the form (what you did)
  3. Use the Referer HTTP header (not referrer, referer, it's a typo on the spec)

I think the third is the simplest, but because the browser may not send the header if the user configured a higher security or you used noreferer the second is the safest.


That said, if you move the action to the route with the Form this will not be an issue anymore, the URL change will also not happen.

And the reason the URL change from /sales/invoices/102000 to /sales to /sales/invoices/102000 is because a Form does a navigation, it navigate…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@tavoyne
Comment options

Comment options

You must be logged in to vote
3 replies
@tavoyne
Comment options

@sergiodxa
Comment options

@tavoyne
Comment options

Answer selected by tavoyne
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants