-
Notifications
You must be signed in to change notification settings - Fork 97
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 to handle URI::InvalidURIError? #78
Comments
👍 I was running into this issue with urls that have curly braces, like |
Monkey patching example: module Rack
class SslEnforcer
alias_method :modify_location_and_redirect_orig, :modify_location_and_redirect
def modify_location_and_redirect
modify_location_and_redirect_orig
rescue URI::InvalidURIError
body = { status: 400, error: 'Bad Request' }
[400, { 'Content-Type' => 'application/json' }, [ body.to_json ] ]
end
end
end |
@fzagarzazu Thanks for your solution! |
Can a new version be released? |
Hey, sure. I'll release a new version within the next few days after taking a closer look at #79 |
+1 |
Hey, 0.2.9 should be available via Rubygems... |
Caused by any bad URL like
http://example.com/<lan
stacktrace:
The text was updated successfully, but these errors were encountered: