feat: add support for base_url with a port

This commit is contained in:
Kent Rasmussen
2023-10-21 17:32:04 +09:00
parent 90e9df9240
commit 58514c887e
3 changed files with 32 additions and 27 deletions
+1 -1
View File
@@ -1492,7 +1492,7 @@ def create_server_api(**args):
if keyword!=secrets.SERVER_MASTER: jhtml(self,{"failed":1}); return
actual_ip=ip=self.request.remote_addr; server_name="XX"
if is_sdk: actual_ip=ip=domain.server_ip
if domain.https_mode: ip="%s.%s.%s"%(ip_to_subdomain.get(ip,ip),live_domain[1],live_domain[2])
if domain.https_mode: ip="%s.%s"%(ip_to_subdomain.get(ip,ip),live_domain)
lat,lon=(self.request.headers.get("X-Appengine-Citylatlong")or"0,0").split(",")
try: lat,lon=float(lat),float(lon)
except: lat,lon=0,0