mirror of
https://github.com/thiagoralves/OpenPLC_v3.git
synced 2025-10-14 02:19:43 +08:00
Fix Windows/MSYS2 compatibility: convert Path to str for ssl_context
Flask/Werkzeug's ssl_context parameter expects string paths, not pathlib.Path objects. On Windows/MSYS2, passing Path objects causes 'Resource temporarily unavailable' error. Converting to strings maintains Linux compatibility while fixing Windows support. Fixes the error reported by user where context showed PosixPath objects instead of strings, causing Flask to fail on Windows/MSYS2. Co-Authored-By: Thiago Alves <thiagoralves@gmail.com>
This commit is contained in:
@@ -2672,7 +2672,7 @@ def run_https():
|
||||
print("Credentials already generated!")
|
||||
|
||||
try:
|
||||
context = (CERT_FILE, KEY_FILE)
|
||||
context = (str(CERT_FILE), str(KEY_FILE))
|
||||
app_restapi.run(debug=False, host='0.0.0.0', threaded=True, port=8443, ssl_context=context)
|
||||
except KeyboardInterrupt as e:
|
||||
print(f"Exiting OpenPLC Webserver...{e}")
|
||||
|
Reference in New Issue
Block a user