Skip to content
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

How I can write logs before redirect an URL? #89

Open
arnolfontalvo opened this issue Feb 8, 2018 · 1 comment
Open

How I can write logs before redirect an URL? #89

arnolfontalvo opened this issue Feb 8, 2018 · 1 comment

Comments

@arnolfontalvo
Copy link

I have this configuration on mi config.ru file

require 'rack/rewrite'
use Rack::Rewrite do
r302 %r{/marketing/([^\?])(?.)*}, '/$1'
end

I want make rails write log before redirect.

Example:
this route http://limbiq.test:3000/marketing/admin/login will redirect to http://limbiq.test:3000/admin/login, but not log information is writing. do you have any Idea to do this?

@pascalbetz
Copy link

Should be possible by supplying a Proc like so:

https://github.com/jtrupiano/rack-rewrite#arbitrary-rewriting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants