diff --git a/Assets/Src/LapService.cs b/Assets/Src/LapService.cs index c3afee8..1d8cf5e 100644 --- a/Assets/Src/LapService.cs +++ b/Assets/Src/LapService.cs @@ -42,7 +42,7 @@ public class LapService { } public IEnumerator GetLapTimes() { - string uri = $"https://spacerace.systems/LapTimes?userId={_player.Id}&mapName={_mapName}"; + string uri = $"https://spacerace.systems/api/LapTimes?userId={_player.Id}&mapName={_mapName}"; using (UnityWebRequest req = UnityWebRequest.Get(uri)) { yield return req.SendWebRequest(); @@ -95,7 +95,7 @@ public class LapService { Debug.Log($"Posting lap: {JsonConvert.SerializeObject(dto)}"); - using (UnityWebRequest req = UnityWebRequest.Post("https://spacerace.systems/Lap", JsonConvert.SerializeObject(dto), "application/json")) { + using (UnityWebRequest req = UnityWebRequest.Post("https://spacerace.systems/api/Lap", JsonConvert.SerializeObject(dto), "application/json")) { yield return req.SendWebRequest(); if (req.result != UnityWebRequest.Result.Success) { diff --git a/nginx/spacerace.systems.nginx.conf b/nginx/spacerace.systems.nginx.conf index 904f5e0..e92ed6b 100644 --- a/nginx/spacerace.systems.nginx.conf +++ b/nginx/spacerace.systems.nginx.conf @@ -22,9 +22,9 @@ server { # try_files $uri $uri/ index.html; # } - location / { + location /api { # trailing slash means api will receive url WITHOUT /api - proxy_pass http://spacerace_server/; + proxy_pass http://spacerace_server; proxy_read_timeout 600s; }