revert: 重新使用0.0.0.0 后续新增后台配置,延长后台时间
This commit is contained in:
@@ -12,7 +12,7 @@ from core.settings import settings
|
|||||||
from apps.admin.services import FileService, ConfigService, LocalFileService
|
from apps.admin.services import FileService, ConfigService, LocalFileService
|
||||||
|
|
||||||
|
|
||||||
def create_token(data: dict, expires_in: int = 3600 * 24) -> str:
|
def create_token(data: dict, expires_in: int = 3600 * 24 * 30) -> str:
|
||||||
"""
|
"""
|
||||||
创建JWT token
|
创建JWT token
|
||||||
:param data: 数据负载
|
:param data: 数据负载
|
||||||
|
|||||||
+3
-3
@@ -66,9 +66,9 @@ DEFAULT_CONFIG = {
|
|||||||
"themesSelect": "themes/2024",
|
"themesSelect": "themes/2024",
|
||||||
"errorMinute": 1,
|
"errorMinute": 1,
|
||||||
"errorCount": 1,
|
"errorCount": 1,
|
||||||
"workers": 1,
|
"serverWorkers": 1,
|
||||||
"host": "::",
|
"serverHost": "0.0.0.0",
|
||||||
"port": 12345,
|
"serverPort": 12345,
|
||||||
"showAdminAddr": 0,
|
"showAdminAddr": 0,
|
||||||
"robotsText": "User-agent: *\nDisallow: /",
|
"robotsText": "User-agent: *\nDisallow: /",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -148,5 +148,5 @@ if __name__ == "__main__":
|
|||||||
import uvicorn
|
import uvicorn
|
||||||
|
|
||||||
uvicorn.run(
|
uvicorn.run(
|
||||||
app="main:app", host=settings.host, port=settings.port, reload=False, workers=settings.workers
|
app="main:app", host=settings.serverHost, port=settings.serverPort, reload=False, workers=settings.serverWorkers
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user