修改为https 服务器
This commit is contained in:
+2
-2
@@ -28,9 +28,9 @@ import oss2
|
|||||||
|
|
||||||
COMFYUI_URL = "http://127.0.0.1:8188"
|
COMFYUI_URL = "http://127.0.0.1:8188"
|
||||||
# COMFYUI_URL = "http://117.50.80.187:47697"
|
# COMFYUI_URL = "http://117.50.80.187:47697"
|
||||||
# WORKFLOW_PATH = Path(__file__).parent / "change2_1_ex.json"
|
WORKFLOW_PATH = Path(__file__).parent / "change2_1_ex.json"
|
||||||
|
|
||||||
WORKFLOW_PATH = Path(__file__).parent / "change_fast2.json"
|
# WORKFLOW_PATH = Path(__file__).parent / "change_fast2.json"
|
||||||
|
|
||||||
# 节点 ID 映射
|
# 节点 ID 映射
|
||||||
NODE_MODEL = "11" # 模特
|
NODE_MODEL = "11" # 模特
|
||||||
|
|||||||
+2
-2
@@ -27,9 +27,9 @@ from pydantic import BaseModel
|
|||||||
|
|
||||||
COMFYUI_URL = "http://127.0.0.1:8188"
|
COMFYUI_URL = "http://127.0.0.1:8188"
|
||||||
# COMFYUI_URL = "http://117.50.80.187:47697"
|
# COMFYUI_URL = "http://117.50.80.187:47697"
|
||||||
#WORKFLOW_PATH = Path(__file__).parent / "change2_2_0308.json"
|
WORKFLOW_PATH = Path(__file__).parent / "change2_2_0308.json"
|
||||||
|
|
||||||
WORKFLOW_PATH = Path(__file__).parent / "change_fast3.json"
|
# WORKFLOW_PATH = Path(__file__).parent / "change_fast3.json"
|
||||||
|
|
||||||
# 节点 ID 映射
|
# 节点 ID 映射
|
||||||
NODE_MODEL = "11" # 模特
|
NODE_MODEL = "11" # 模特
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import requests
|
import requests
|
||||||
|
import os
|
||||||
from flask import Flask, jsonify, request, send_from_directory
|
from flask import Flask, jsonify, request, send_from_directory
|
||||||
|
|
||||||
app = Flask(__name__, static_folder='static')
|
app = Flask(__name__, static_folder='static')
|
||||||
@@ -69,3 +70,20 @@ def change_cloth_base64():
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app.run(host="0.0.0.0", port=28889, debug=True)
|
app.run(host="0.0.0.0", port=28889, debug=True)
|
||||||
|
|
||||||
|
# if __name__ == '__main__':
|
||||||
|
# # 证书路径(替换为你的域名)
|
||||||
|
# ssl_cert = '/etc/letsencrypt/live/change.xiangsilian.com/fullchain.pem'
|
||||||
|
# ssl_key = '/etc/letsencrypt/live/change.xiangsilian.com/privkey.pem'
|
||||||
|
|
||||||
|
# # 检查证书文件是否存在
|
||||||
|
# if not os.path.exists(ssl_cert) or not os.path.exists(ssl_key):
|
||||||
|
# print("❌ 证书文件不存在,请检查路径是否正确!")
|
||||||
|
# else:
|
||||||
|
# # 启动HTTPS服务(443端口需要root权限,所以运行时要加sudo)
|
||||||
|
# app.run(
|
||||||
|
# host='0.0.0.0', # 允许外网访问
|
||||||
|
# port=443, # HTTPS默认端口(非443需加端口访问,如8443)
|
||||||
|
# ssl_context=(ssl_cert, ssl_key), # 加载Let's Encrypt证书
|
||||||
|
# debug=True # 生产环境务必关闭debug
|
||||||
|
# )
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
sudo apt install certbot -y
|
||||||
|
sudo certbot certonly --standalone -d change.xiangsilian.com --email youmiss@163.com --agree-tos --non-interactive
|
||||||
Reference in New Issue
Block a user