Skip to content

Commit 0872a21

Browse files
authored
Merge pull request #8112 from michalsn/fix/hot-reloader
fix: Hot reloading when session is enabled
2 parents 6c06f84 + e2ed766 commit 0872a21

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

system/Debug/Toolbar/Views/toolbar.tpl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</style>
2424

2525
<script id="toolbar_js">
26-
var ciSiteURL = "<?= site_url() ?>"
26+
var ciSiteURL = "<?= rtrim(site_url(), '/') ?>"
2727
<?= file_get_contents(__DIR__ . '/toolbar.js') ?>
2828
</script>
2929
<div id="debug-icon" class="debug-bar-ndisplay">

system/HotReloader/HotReloader.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ final class HotReloader
1818
{
1919
public function run(): void
2020
{
21+
if (session_status() === PHP_SESSION_ACTIVE) {
22+
session_write_close();
23+
}
24+
2125
ini_set('zlib.output_compression', 'Off');
2226

2327
header('Cache-Control: no-store');

0 commit comments

Comments
 (0)