File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11HOST = "127.0.0.1"
22PORT = 7065
33DEBUG_PORT = 7066
4+ ALLOW_UNSAFE_ORIGIN = False
5+ LOGGING = True
46
57# Heuristically detect the python executable path
68PYTHON = ""
2628 break
2729if len (PYTHON ) == 0 or not os .path .exists (PYTHON ):
2830 raise FileNotFoundError ("[IDACode] Could not find python executable, report an issue!" )
29-
30- LOGGING = True
Original file line number Diff line number Diff line change @@ -36,6 +36,10 @@ def start_debug_server():
3636 print ("[IDACode] Started debugpy server on {}:{}" .format (debugpy_host , debugpy_port ))
3737
3838class SocketHandler (tornado .websocket .WebSocketHandler ):
39+ def check_origin (self , origin ):
40+ # NOTE: This is called when connecting from a browser
41+ return settings .ALLOW_UNSAFE_ORIGIN
42+
3943 def open (self ):
4044 print ("[IDACode] Client connected" )
4145
You can’t perform that action at this time.
0 commit comments