-
Notifications
You must be signed in to change notification settings - Fork 178
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
Do not render web console for non-HTML requests #317
Comments
Do you happen to render this JSON in a response with HTML media type? We really try to render the console only on HTML requests: web-console/lib/web_console/middleware.rb Lines 54 to 56 in 83b282e
|
That makes sense - I do have some HTML endpoints retrieved via Perhaps also checking Unfortunately this doesn't also work for the new |
XHR requests are used in Turbo and I'm a bit reluctant to cut all of them off. Using Turbolinks or its newer incarnations is common for Rails projects. |
Turbo uses |
Didn't realise that |
If I get an error fetching some JSON in an XHR request, rendering web-console isn't going to help; I'm better off dropping into a debugger on the server process.
Any interest in adding merging a PR adding rails configuration setting like
config.web_console.skip_request? = lambda {|request| request.xhr?}
The text was updated successfully, but these errors were encountered: