Comments (13)
I've thought about this, and the problem is that it might encourage people to use Anbu in a production environment. I'd rather they only register its SP within a development env config file. What do you think?
from anbu.
What would be the danger of using Anbu in production as long as it's disabled?
The reason I listen to app.debug in laravel-debugbar (and what I've seen from most other profilers), is that you sometimes want to enable it at runtime (for specific IPs, admin users etc to 'hotfix' something), or because I tend to forget to remove a debug statement, which would crash when the SP isn't registered.
I would think the impact should be minimal if you don't actually debug/listen to events and change the output.
from anbu.
@daylerees maybe you could put a guard in the service provider, and if the env is production (or not local/testing/wathever) return without continuing, preventing the /anbu routes and everything else from appearing, even if the button is hidden.
from anbu.
+1
I was going to request this but was waiting for the first beta release since dayle is already putting in so much work into this and mentioned not to submit bugfix/prs yet.
from anbu.
Another library that does this is Barryvdh\Debugbar
from anbu.
👍 for doing it like debugbar does. It has an enabled
config key which by default is set to Config::get('app.debug')
, so people can manually just set it to true/false if they want to.
https://github.com/barryvdh/laravel-debugbar/blob/v1.7.6/src/config/config.php#L16
from anbu.
I say ditto to @GrahamCampbell and @timReynolds' comments. FWIW.
Bud
from anbu.
I also like the debugbar approach :)
from anbu.
I know it's a bit lazy but I like to turn debug on momentarily if I encounter unexpected behaviour in production (our app is internal so this isn't too bad), having Anbu turn on at the same time would be great!
from anbu.
Maybe something like a maintenance command.
php artisan anbu:debug up/down/status
or
php artisan anbu:debug on/off/status
with status you can check if the current application is in debug mode. This way when deploying its always off and can be turned on by these commands.
from anbu.
@daylerees is your only concern that some people might turn it on in production which will affect performance and probably security? Would be good to understand your thoughts, generally people seem to like the convenience of it being linked to app.debug
from anbu.
Hi guys, performance and security are my main concerns. However, it looks like the majority would be interested in having a configuration key, with a default value of app.debug
. I'll make this happen in the next alpha which shouldn't be too long now.
from anbu.
@daylerees Thanks mate!
from anbu.
Related Issues (20)
- [FEATURE] Disable when 'testing' is true (messes up Behat tests) HOT 3
- [FEATURE] Peacefully coexist with Laravel-Debugbar HOT 10
- Serialization of UploadedFile is not allowed HOT 7
- Response send header is not working HOT 2
- Support Laravel 5.0 Blade Syntax HOT 7
- Error HOT 1
- Data serialization HOT 6
- Manually place button
- Conflict with Codeception, produces error LARAVEL_STARTUP HOT 1
- Anbu::disable() does not work HOT 1
- A humble idea, what to put there
- On windows with Laravel 4.3 getting this HOT 2
- Fatal exception when using anbu HOT 6
- Thought - quickly go to latest "tabs"
- Anbu html outputs before any other output, including headers HOT 1
- Laravel 5 HOT 3
- Conflict with Asset Pipeline HOT 3
- Very slow on load any page from laravel projetct HOT 5
- How do I install the package HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anbu.