Giter Site home page Giter Site logo

Comments (13)

daylerees avatar daylerees commented on May 22, 2024

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.

barryvdh avatar barryvdh commented on May 22, 2024

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.

MartelliEnrico avatar MartelliEnrico commented on May 22, 2024

@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.

foysalit avatar foysalit commented on May 22, 2024

+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.

timReynolds avatar timReynolds commented on May 22, 2024

Another library that does this is Barryvdh\Debugbar

from anbu.

GrahamCampbell avatar GrahamCampbell commented on May 22, 2024

👍 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.

manzwebdesigns avatar manzwebdesigns commented on May 22, 2024

I say ditto to @GrahamCampbell and @timReynolds' comments. FWIW.

Bud

from anbu.

foxted avatar foxted commented on May 22, 2024

I also like the debugbar approach :)

from anbu.

cfreear avatar cfreear commented on May 22, 2024

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.

marcvdm avatar marcvdm commented on May 22, 2024

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.

timReynolds avatar timReynolds commented on May 22, 2024

@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.

daylerees avatar daylerees commented on May 22, 2024

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.

mikeerickson avatar mikeerickson commented on May 22, 2024

@daylerees Thanks mate!

from anbu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.