configs  Artifact [b3cd148fe7]

Artifact b3cd148fe7ae4450786a81e12128f4d69d34aade30a04a0de1d97834517bd3c4:

  • Executable file bin/element-web — part of check-in [1921733a2d] at 2023-03-19 11:57:57 on branch trunk — Add bin/element-web (user: js size: 647)

#!/usr/bin/env python3
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()