mirror of
https://github.com/PaiGramTeam/MibooGram.git
synced 2024-11-21 14:48:29 +00:00
🐛 Fix WebServer configuration
Co-authored-by: Karako <karakohear@gmail.com>
This commit is contained in:
parent
e086820851
commit
dfe58215ae
@ -84,10 +84,9 @@ LOGGER_FILTERED_NAMES=["uvicorn","ErrorPush","ApiHelper"]
|
||||
# ENKA_NETWORK_API_AGENT=""
|
||||
|
||||
# Web Server
|
||||
# WEB_SWITCH=False # 是否开启
|
||||
# WEB_URL=http://localhost:8080/
|
||||
# WEB_HOST=localhost
|
||||
# WEB_PORT=8080
|
||||
# WEB_ENABLE=False # 是否开启 WebServer
|
||||
# WEB_HOST=localhost # WebServer 监听地址
|
||||
# WEB_PORT=8080 # WebServer 监听端口
|
||||
|
||||
# error
|
||||
# ERROR_PB_URL=https://fars.ee
|
||||
|
@ -68,13 +68,17 @@ class WebServerConfig(Settings):
|
||||
enable: bool = False
|
||||
"""是否启用WebServer"""
|
||||
|
||||
url: AnyUrl = "http://localhost:8080"
|
||||
host: str = "localhost"
|
||||
port: int = 8080
|
||||
|
||||
class Config(Settings.Config):
|
||||
env_prefix = "web_"
|
||||
|
||||
@property
|
||||
def url(self) -> str:
|
||||
# noinspection HttpUrlsUsage
|
||||
return "http://" + self.host + ":" + str(self.port)
|
||||
|
||||
|
||||
class ErrorConfig(Settings):
|
||||
pb_url: str = ""
|
||||
|
Loading…
Reference in New Issue
Block a user