无法通过https在8080以外的端口上访问Flask Web应用程序

时间:2019-02-14 06:20:19

标签: python flask https port

我在https上使用flask托管了一个简单的Web应用程序。如果我将其托管在端口8080上,则一切正常。但是如果我使用其他任何端口(例如8090、8000、7091等)托管它。我收到以下错误:

This site can’t be reached

The webpage at https://someip:8000/ might be temporarily down or it may have moved permanently to a new web address.

ERR_TUNNEL_CONNECTION_FAILED

以下是烧瓶代码:

from flask import Flask
app = Flask(__name__)
@app.route('/')
def home():
   return "Hey there!"
if __name__ == '__main__':
   app.run(host='someip',port=8000,ssl_context=('cert.pem', 'key.pem'))

有人可以帮助我解决这个问题吗?

0 个答案:

没有答案
相关问题