Open raihanM99 opened 9 months ago
@raihanM99 thank you!
I also checked if it is defined as test and production do not load debugbar and therefor will break the initialization.
if defined? Debugbar
Debugbar.configure do |config|
config.ignore_request = ->(env) { env["PATH_INFO"].start_with? "/uploads" }
end
end
Hello! I'm having the same problem but this workaround doesn't fit very well into our system since we get this errors from a GraphQL endpoint on which you would need to introspect the query to know if it's dealing with files.
It's also a pity not being able to see requests involving files in debugbar.
Would it be possible to use another mechanism to generate response_hash
here? https://github.com/julienbourdeau/debugbar/blob/master/lib/debugbar/request.rb#L94 Why it needs to use response.body
for it?
I would be happy to contribute if you guide me on how to do so :)
In my Rails project, I encountered an issue related to handling attachments. Specifically, when accessing a page that invokes an attachment from Active Storage using (e.g
<%= user.avatar %>
), an error occurred.This issue arose due to Rails generating a URL every time it accesses the Active Storage attachment.
To resolve this, I modified the configuration in the
config/initializers/debugbar.rb
file to ignore/uploads
, which successfully resolved the issue