mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 10:58:28 +00:00
Merge pull request #1464 from PepperDash/fix-mobile-control-join-response-caching
fix(mobile-control): update version and improve response caching for …
This commit is contained in:
commit
12e5ff752d
2 changed files with 8 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>2.36.6-local</Version>
|
<Version>2.42.1-local</Version>
|
||||||
<InformationalVersion>$(Version)</InformationalVersion>
|
<InformationalVersion>$(Version)</InformationalVersion>
|
||||||
<Authors>PepperDash Technology</Authors>
|
<Authors>PepperDash Technology</Authors>
|
||||||
<Company>PepperDash Technology</Company>
|
<Company>PepperDash Technology</Company>
|
||||||
|
|
|
||||||
|
|
@ -1162,6 +1162,11 @@ namespace PepperDash.Essentials.WebSocketServer
|
||||||
var qp = req.QueryString;
|
var qp = req.QueryString;
|
||||||
var token = qp["token"];
|
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);
|
this.LogVerbose("Join Room Request with token: {token}", token);
|
||||||
|
|
||||||
byte[] body;
|
byte[] body;
|
||||||
|
|
@ -1263,6 +1268,8 @@ namespace PepperDash.Essentials.WebSocketServer
|
||||||
{
|
{
|
||||||
res.StatusCode = 200;
|
res.StatusCode = 200;
|
||||||
res.ContentType = "application/json";
|
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 version = new Version() { ServerVersion = _parent.GetConfigWithPluginVersion().RuntimeInfo.PluginVersion };
|
||||||
var message = JsonConvert.SerializeObject(version);
|
var message = JsonConvert.SerializeObject(version);
|
||||||
this.LogVerbose("{message}", message);
|
this.LogVerbose("{message}", message);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue