From e941c6a6066282e1c42822b1ac1343bdb2d94ed5 Mon Sep 17 00:00:00 2001 From: Hay1tsme Date: Mon, 20 Nov 2023 11:54:13 -0500 Subject: [PATCH] add host field to allnet response for some games to fix an issue with nginx --- titles/chuni/index.py | 4 ++-- titles/diva/index.py | 4 ++-- titles/wacca/index.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/titles/chuni/index.py b/titles/chuni/index.py index 03be049..670dbe8 100644 --- a/titles/chuni/index.py +++ b/titles/chuni/index.py @@ -142,9 +142,9 @@ class ChuniServlet(BaseServlet): def get_allnet_info(self, game_code: str, game_ver: int, keychip: str) -> Tuple[str, str]: if not self.core_cfg.server.is_using_proxy and Utils.get_title_port(self.core_cfg) != 80: - return (f"http://{self.core_cfg.title.hostname}:{Utils.get_title_port(self.core_cfg)}/{game_ver}/", "") + return (f"http://{self.core_cfg.title.hostname}:{Utils.get_title_port(self.core_cfg)}/{game_ver}/", self.core_cfg.title.hostname) - return (f"http://{self.core_cfg.title.hostname}/{game_ver}/", "") + return (f"http://{self.core_cfg.title.hostname}/{game_ver}/", self.core_cfg.title.hostname) def render_POST(self, request: Request, game_code: str, matchers: Dict) -> bytes: endpoint = matchers['endpoint'] diff --git a/titles/diva/index.py b/titles/diva/index.py index b4ba73e..ac4114e 100644 --- a/titles/diva/index.py +++ b/titles/diva/index.py @@ -59,9 +59,9 @@ class DivaServlet(BaseServlet): def get_allnet_info(self, game_code: str, game_ver: int, keychip: str) -> Tuple[str, str]: if not self.core_cfg.server.is_using_proxy and Utils.get_title_port(self.core_cfg) != 80: - return (f"http://{self.core_cfg.title.hostname}:{Utils.get_title_port(self.core_cfg)}/DivaServlet/", "") + return (f"http://{self.core_cfg.title.hostname}:{Utils.get_title_port(self.core_cfg)}/DivaServlet/", self.core_cfg.title.hostname) - return (f"http://{self.core_cfg.title.hostname}/DivaServlet/", "") + return (f"http://{self.core_cfg.title.hostname}/DivaServlet/", self.core_cfg.title.hostname) @classmethod def is_game_enabled( diff --git a/titles/wacca/index.py b/titles/wacca/index.py index 7277fd8..90e4a0b 100644 --- a/titles/wacca/index.py +++ b/titles/wacca/index.py @@ -89,10 +89,10 @@ class WaccaServlet: if not self.core_cfg.server.is_using_proxy and Utils.get_title_port(self.core_cfg) != 80: return ( f"http://{self.core_cfg.title.hostname}:{Utils.get_title_port(self.core_cfg)}/WaccaServlet", - "", + self.core_cfg.title.hostname, ) - return (f"http://{self.core_cfg.title.hostname}/WaccaServlet", "") + return (f"http://{self.core_cfg.title.hostname}/WaccaServlet", self.core_cfg.title.hostname) def render_POST(self, request: Request, game_code: str, matchers: Dict) -> bytes: def end(resp: Dict) -> bytes: