2

我可以使用 HTTPS 访问应用程序,但是在将其转换为 https 后,如何将其重定向到监听 http。

当我尝试使用 http 访问它时,出现以下错误。

    ssl.SSLError: [SSL: SSLV3_ALERT_CERTIFICATE_UNKNOWN] sslv3 alert certificate unknown (_ssl.c:1056)
2020-03-30T15:58:35Z <Greenlet at 0x1d7ca90ce18: _handle_and_close_when_done(<bound method StreamServer.wrap_socket_and_handle , <bound method StreamServer.do_close of <WSGIServer, (<gevent._socket3.socket [closed]  object, fd=-1, )> failed with SSLError

我的运行.py

from search_app import app
from gevent.pywsgi import WSGIServer
import os


if __name__ == '__main__':
    http_server = WSGIServer(('127.0.0.1', 5000), app, keyfile=f'{os.path.dirname(app.instance_path)}\\private.key', certfile=f'{os.path.dirname(app.instance_path)}\\xyz.crt')
    http_server.serve_forever()
4

0 回答 0