Skip to content

Commit f5ae97f

Browse files
kirre-bylundkristijan-ujevic
authored andcommitted
Add User-Instance-Identifier Header
The purpose of this is to be able to keep track of a game instance across network switches and session changes for logging purposes.
1 parent 26f0e3e commit f5ae97f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Runtime/Client/LootLockerBaseServerAPI.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ IEnumerator coroutine()
7373
#if UNITY_EDITOR
7474
LootLockerLogger.GetForLogLevel(LootLockerLogger.LogLevel.Verbose)("ServerRequest " + request.httpMethod + " URL: " + url);
7575
#endif
76-
7776
using (UnityWebRequest webRequest = CreateWebRequest(url, request))
7877
{
7978
webRequest.downloadHandler = new DownloadHandlerBuffer();
@@ -203,7 +202,8 @@ IEnumerator coroutine()
203202
{ "Access-Control-Allow-Credentials", "true" },
204203
{ "Access-Control-Allow-Headers", "Accept, X-Access-Token, X-Application-Name, X-Request-Sent-Time" },
205204
{ "Access-Control-Allow-Methods", "GET, POST, DELETE, PUT, OPTIONS, HEAD" },
206-
{ "Access-Control-Allow-Origin", "*" }
205+
{ "Access-Control-Allow-Origin", "*" },
206+
{ "User-Instance-Identifier", System.Guid.NewGuid().ToString() }
207207
};
208208

209209
protected event System.Action<ServerError> OnError;

0 commit comments

Comments
 (0)