CORS change

This commit is contained in:
Brahim Hadriche committed 2025-05-15 22:22:52 -04:00
1 parent 5762de656c
commit 0e226cfc42
2 files changed
+8 -1

No files matched your search

+4
View File
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- A bug where Session data did not refresh after 24 hours
### Changed
- [advanced users]: the Playlet web server's CORS headers are no longer set to `*`, for security reasons.
## [0.36.7] - 2025-05-04
### Fixed
@@ -36,7 +36,10 @@ function GetServerAddress(_unused as dynamic) as dynamic
end function
function SetupRoutes(server as object)
server.UseRouter(new Http.CorsMiddleware())
#if DEBUG
'CORS is mostly for developing the web app
server.UseRouter(new Http.CorsMiddleware())
#end if
if server.settings.WebSocketsEnabled
server.UseRouter(new Http.WebSocketMiddleware())
end if