mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
WebHost: some updates (#603)
* WebHost: Make custom server prefer ipv4 for display * WebHost: Make server retry saving in case of connection issues * WebHost: fix autolaunch guardians getting stuck waiting for the oldest two rooms. Probably not related to the issues of the system itself getting stuck, but should be fixed anyway. * WebHost: logfile is meant to be guarded by access cookie * WebHost: set patch target to null if port is not valid, disabling auto-connect
This commit is contained in:
@@ -170,7 +170,9 @@ def _read_log(path: str):
|
||||
|
||||
@app.route('/log/<suuid:room>')
|
||||
def display_log(room: UUID):
|
||||
return Response(_read_log(os.path.join("logs", str(room) + ".txt")), mimetype="text/plain;charset=UTF-8")
|
||||
if room.owner == session["_id"]:
|
||||
return Response(_read_log(os.path.join("logs", str(room) + ".txt")), mimetype="text/plain;charset=UTF-8")
|
||||
return "Access Denied", 403
|
||||
|
||||
|
||||
@app.route('/room/<suuid:room>', methods=['GET', 'POST'])
|
||||
|
Reference in New Issue
Block a user