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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass along arguments to underlying `get` method in `follow_redirect!` #33299

Merged
merged 3 commits into from Jul 5, 2018

Conversation

Projects
None yet
2 participants
@remofritzsche
Contributor

remofritzsche commented Jul 5, 2018

Summary

This commit makes sure all arguments passed to follow_redirect! are passed on to the underlying call to the get method.

One possible use case for this is setting headers that may, outside of the testing environment, be set automatically on every request, i.e. by a web application firewall.

Thanks for reviewing this 馃憤

remofritzsche added some commits Jul 5, 2018

Merge pull request #1 from rails/master
Update from rails
Allow get arguments for follow_redirect
Now all arguments passed to `follow_redirect!` are passed to the
underlying `get` method. This for example allows to set custom headers
for the redirection request to the server.

This is especially useful for setting headers that may, outside of the
testing environment, be set automatically on every request, i.e. by a
web application firewall.

@rafaelfranca rafaelfranca merged commit a0061d2 into rails:master Jul 5, 2018

2 checks passed

codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment