tls only with cert_file_name for now

main
Ciro Spaciari 2024-07-13 18:40:57 -07:00 zatwierdzone przez GitHub
rodzic 30cec004e0
commit 2f9c267e01
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -573,8 +573,8 @@ class _ASGI:
self.server = App(options, task_factory_max_items=0)
self.SERVER_PORT = None
self.SERVER_HOST = ""
self.SERVER_SCHEME = "https" if self.server.options else "http"
self.SERVER_WS_SCHEME = "wss" if self.server.options else "ws"
self.SERVER_SCHEME = "https" if self.server.options and self.server.options.cert_file_name is not None else "http"
self.SERVER_WS_SCHEME = "wss" if self.server.options and self.server.options.cert_file_name is not Noneelse "ws"
self.task_factory_max_items = task_factory_max_items
self.lifespan = lifespan

Wyświetl plik

@ -671,7 +671,7 @@ class _WSGI:
"wsgi.errors": sys.stderr,
"wsgi.version": (1, 0),
"wsgi.run_once": False,
"wsgi.url_scheme": "https" if self.server.options else "http",
"wsgi.url_scheme": "https" if self.server.options and self.server.options.cert_file_name is not None else "http",
"wsgi.multithread": False,
"wsgi.multiprocess": False,
"wsgi.file_wrapper": None, # No file wrapper support for now