Skip to content

Commit

Permalink
added tracy extensions and gzip
Browse files Browse the repository at this point in the history
  • Loading branch information
n0nag0n committed Mar 2, 2024
1 parent e0dba27 commit 82f70a1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/config/config_sample.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

use flight\debug\tracy\TracyExtensionLoader;
use Tracy\Debugger;

// Set the default timezone
Expand Down Expand Up @@ -47,8 +48,9 @@
Debugger::$logDirectory = __DIR__ . $ds . '..' . $ds . 'log';
Debugger::$strictMode = true; // display all errors
// Debugger::$strictMode = E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED; // all errors except deprecated notices
if (Debugger::$showBar) {
if (Debugger::$showBar && php_sapi_name() !== 'cli') {
$app->set('flight.content_length', false); // if Debugger bar is visible, then content-length can not be set by Flight
(new TracyExtensionLoader($app));
}

/*
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"start": "php -S localhost:8000 -t public"
},
"require-dev": {
"flightphp/tracy-extensions": "^0.1.2",
"tracy/tracy": "^2.9"
}
}
8 changes: 7 additions & 1 deletion public/.htaccess
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]
RewriteRule ^(.*)$ index.php [QSA,L]

# BEGIN GZIP
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</ifmodule>
# END GZIP

0 comments on commit 82f70a1

Please sign in to comment.