fix: 下载脚本的文件名异常

This commit is contained in:
helloplhm-qwq 2024-02-07 09:45:07 +08:00
parent 6ef26f864c
commit 00de8745b5
No known key found for this signature in database
GPG Key ID: 6BE1B64B905567C7

View File

@ -105,7 +105,7 @@ async def generate_script_response(request):
'Content-Disposition': f'''attachment; filename={ 'Content-Disposition': f'''attachment; filename={
config.read_config("common.download_config.filename") config.read_config("common.download_config.filename")
if config.read_config("common.download_config.filename").endswith(".js") if config.read_config("common.download_config.filename").endswith(".js")
else (config.read_config("common.download_config.filename" + ".js"))}''' else (config.read_config("common.download_config.filename") + ".js")}'''
}) })
if (config.read_config('common.allow_download_script')): if (config.read_config('common.allow_download_script')):