You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Connects to SSE endpoint (provided in the extension) and watch specified directories and (or) files. Uses `Nette\Utils\Finder` under the hood, so you can setup Finder according to your needs.
38
+
Connects to SSE endpoint (provided in the extension out of the box) and watch specified directories and (or) files. Uses `Nette\Utils\Finder` under the hood, so you can setup Finder according to your needs.
38
39
39
40
Second section - marked `internal` is related to SSE itself. It's kind of selfexplanatory.
40
41
41
42
```php
42
43
// minimal setup
43
44
Common\Tracy\ReloadPanel('SSE', [
44
-
// Finder
45
+
// Nette\Utils\Finder config
45
46
'mask' => '*.*',
46
47
'in' => null,
47
48
'from' => null,
48
49
'exclude' => null,
49
50
'excludeDir' => null,
50
51
// internal
51
-
'timeout' => 30, // every script runs only for 30 seconds
'timeout' => 30, // SSE/Reloader.php max execution time
54
+
'watchInterval' => 2, // loop sleep interval
54
55
]);
55
56
```
56
57
57
-
### ExcludeHeaders
58
+
### Filter ajax requests
59
+
60
+
It is not desired to render tracy panel for AJAX requests. Basic AJAX requests are filtered out automatically, but if you send some additional AJAX requests, you can filter them out by specifying headers that are related to these requests.
58
61
59
-
Additional check for request for which extension should return nothing. Basically extension should not render for AJAX requests. Because on every render it connects to LiveReload/SSE endpoint and that's not wanted on ajax requests.
62
+
These headers should be specified in `excludedHeaders` property of `$config` as `$key: $value` pairs.
60
63
61
-
Provide any `key => value` pair for additional headers, which signal AJAX request.
0 commit comments