Skip to content

Commit

Permalink
Merge pull request #8112 from michalsn/fix/hot-reloader
Browse files Browse the repository at this point in the history
fix: Hot reloading when session is enabled
  • Loading branch information
kenjis authored Oct 30, 2023
2 parents 6c06f84 + e2ed766 commit 0872a21
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion system/Debug/Toolbar/Views/toolbar.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</style>

<script id="toolbar_js">
var ciSiteURL = "<?= site_url() ?>"
var ciSiteURL = "<?= rtrim(site_url(), '/') ?>"
<?= file_get_contents(__DIR__ . '/toolbar.js') ?>
</script>
<div id="debug-icon" class="debug-bar-ndisplay">
Expand Down
4 changes: 4 additions & 0 deletions system/HotReloader/HotReloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ final class HotReloader
{
public function run(): void
{
if (session_status() === PHP_SESSION_ACTIVE) {
session_write_close();
}

ini_set('zlib.output_compression', 'Off');

header('Cache-Control: no-store');
Expand Down

0 comments on commit 0872a21

Please sign in to comment.