Symfony Debugbar на производственном сервереPhp

Кемеровские программисты php общаются здесь
Ответить
Anonymous
 Symfony Debugbar на производственном сервере

Сообщение Anonymous »

I am trying to activate my debugbar on my production server, but restrict it by IP, so it would only be available to me (and the others developers).
Nothing I tried worked, here's the list of what I did :
  • Added to my require : symfony/debug-bundle, symfony/web-profiler-bundle, Symfony/var-dumper
  • config/bundles.php: symfony \ bundle \ debugbundle \ debugbundle :: class => ['all' => true],

    функциональный : < /p>

    Код: Выделить всё

    when@prod:
    web_profiler:
    toolbar: true
    intercept_redirects: false
    
    framework:
    profiler:
    enabled: true
    collect: true
    only_exceptions: false
    
  • config/routes/web_profiler.yaml:

    Код: Выделить всё

    _wdt:
    resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
    prefix: /_wdt
    
    _profiler:
    resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
    prefix: /_profiler
    
  • config/services.yaml:

    Код: Выделить всё

    Symfony\Component\HttpKernel\Profiler\Profiler:
    alias: profiler
    
Я создал файл src/eventsubscriber/profilersubscriber.php:

Код: Выделить всё


Подробнее здесь: [url]https://stackoverflow.com/questions/79729485/symfony-debugbar-on-a-production-server[/url]
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Php»