maximebf / php-debugbar

Debug bar for PHP
phpdebugbar.com
MIT License
4.2k stars 402 forks source link

Public access Resource problem from directory /vendor #586

Open h2lsoft opened 9 months ago

h2lsoft commented 9 months ago

Uur vendor directory is protected by htaccess so package resource.

Is there a way to better way to display debugbar resource without pointing to vendor folder ?

We add this in root folder .htaccess to bypass:

# protect vendor/composer RewriteRule ^composer\.(lock|json)$ / [F,L] RewriteCond %{REQUEST_URI} !^/vendor/maximebf/debugbar/src/DebugBar/Resources RewriteRule ^vendor/(.*)?$ / [F,L]

parallels999 commented 9 months ago

You could do your own route "bypass", look how others have done it barryvdh/laravel-debugbar/JavascriptRenderer.php barryvdh/laravel-debugbar/Controllers/AssetController.php Other option, you could make a symlink and change assets basepath on configs it all depends on your ingenuity, there are many ways