How do I disable the Symfony 2 profiler bar?

前端 未结 8 1413
清酒与你
清酒与你 2021-01-30 10:29

It\'s not adding anything and it makes the page slower and I want it gone. Don\'t ask. There\'s little about the profiler on the website and nothing in the app config.

相关标签:
8条回答
  • 2021-01-30 11:20

    Another way that seems to disable it, is to not have _dev in the routing of the application.

    So for me in a bitnami install of Symfony 2, simply by changing app/conf/httpd-app.conf slightly it would change the program:

    RewriteBase /symfony/app_dev.php
    

    to

    RewriteBase /symfony/
    

    and it would keep the toolbar from coming up.

    0 讨论(0)
  • 2021-01-30 11:22

    If you have created a new Symfony project since Symfony 2.5, these parameters are set in app/config/paramaters.yml

    parameters:
        # ...
        debug_toolbar: true
        debug_redirects: false
    

    Just set debug_toolbar to false.

    0 讨论(0)
提交回复
热议问题