mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
fix(mobile-control): update version and improve response caching for join requests
This commit is contained in:
parent
aff4c1e897
commit
85a4b635f6
2 changed files with 8 additions and 1 deletions
|
|
@ -1162,6 +1162,11 @@ namespace PepperDash.Essentials.WebSocketServer
|
|||
var qp = req.QueryString;
|
||||
var token = qp["token"];
|
||||
|
||||
// Each join mints a single-use clientId; the panel webview must never replay a cached
|
||||
// response, or it reconnects forever with an already-consumed id (1008 loop).
|
||||
res.Headers.Add("Cache-Control", "no-store");
|
||||
res.Headers.Add("Pragma", "no-cache");
|
||||
|
||||
this.LogVerbose("Join Room Request with token: {token}", token);
|
||||
|
||||
byte[] body;
|
||||
|
|
@ -1263,6 +1268,8 @@ namespace PepperDash.Essentials.WebSocketServer
|
|||
{
|
||||
res.StatusCode = 200;
|
||||
res.ContentType = "application/json";
|
||||
res.Headers.Add("Cache-Control", "no-store");
|
||||
res.Headers.Add("Pragma", "no-cache");
|
||||
var version = new Version() { ServerVersion = _parent.GetConfigWithPluginVersion().RuntimeInfo.PluginVersion };
|
||||
var message = JsonConvert.SerializeObject(version);
|
||||
this.LogVerbose("{message}", message);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue