configs  Artifact [2921fa2e0e]

Artifact 2921fa2e0ea9a00f0251210515a1b8ba54d2df9924f7007f3ffd20ddc57d13f7:

  • Executable file bin/element-web — part of check-in [6e6b3b4a73] at 2023-11-26 23:22:24 on branch trunk — bin/element-web: Force to Python 3.10 (user: js size: 650)

#!/usr/bin/env python3.10
from http.server import HTTPServer, SimpleHTTPRequestHandler
import os
import socket
import ssl

class HTTPServer6(HTTPServer):
    address_family = socket.AF_INET6

class SilentSimpleHTTPRequestHandler(SimpleHTTPRequestHandler):
    def log_message(self, format, *args):
        pass

os.chdir('/opt/pkg/share/element-web')

httpd = HTTPServer6(('::1', 4443), SilentSimpleHTTPRequestHandler)
httpd.socket = ssl.wrap_socket(httpd.socket,
    keyfile=os.path.expanduser("~/.local/share/element-web/key.pem"),
    certfile=os.path.expanduser("~/.local/share/element-web/cert.pem"),
    server_side=True)
httpd.serve_forever()