RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Safe redirects in Rails 7

When enforcing canonical URLs, sometimes I find myself wanting to perform a redirect while retaining most of the params. It’s tempting to use params.merge to build the redirect in this case, but this is risky from a security standpoint. In this article I’ll explain how to perform redirects like these safely in Rails 7. https://mattbrictson.com/blog/safe-rails-redirects

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in