-
-
Notifications
You must be signed in to change notification settings - Fork 98
Open
Labels
Description
Describe the Bug
Restarting the server with Ctrl+R does not reload the server.psd1
when it has custom properties, at least when at the root.
Steps To Reproduce
Steps to reproduce the behavior:
- Save the following to a
ps1
file:
Import-Module Pode
Start-PodeServer -RootPath $PSScriptRoot {
Add-PodeEndpoint -Port 8080 -Protocol HTTP
Add-PodeRoute -Path '/' -Method GET -ScriptBlock {
(Get-PodeConfig) | ConvertTo-Json -Dep 3 | Write-Host
}
}
- Save the following to the
server.psd1
file:
@{
# CustomProp = @{ }
Web = @{
Compression = @{
Enable = $false
}
}
}
- Start the server
- Open or request
localhost:8080/
- See in the terminal that Web.Compression.Enable is false.
- In the
server.psd1
file, change$false
to$true
, then reload the server with Ctrl+R - Open the page again and see that Web.Compression.Enable is now true. (expected)
- Now, shut down the server completely and uncomment the
CustomProp
line. - Start the server, open the page and see that Web.Compression.Enable is still true. (expected)
- Change
$true
to$false
and reload the server. - Open the page. Despite being changed, Web.Compression.Enable is still true. (unexpected)
Expected Behavior
The final change should be loaded.
Platform
- OS: Linux, Debian 12
- Browser: Firefox 140
- Versions:
- Pode: Pode 2.12.1
- PowerShell: PowerShell 7.5.1
Metadata
Metadata
Assignees
Labels
Projects
Status
Backlog