Compare commits

..

2 Commits

Author SHA1 Message Date
whyour 33fa3aca99 更新版本 2.20.0 2025-12-11 01:53:17 +08:00
whyour c772fc9527 修复脚本调试保存文件错误 2025-12-11 01:52:47 +08:00
4 changed files with 3 additions and 13 deletions
+1 -1
View File
@@ -164,7 +164,7 @@ jobs:
flavor: |
latest=false
tags: |
type=ref,event=branch,enable=${{ github.ref != format('refs/heads/{0}', 'master') }}
type=ref,event=branch,enable=${{ github.ref == format('refs/heads/{0}', 'develop') }}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
type=raw,value=${{ steps.version.outputs.version }},enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
type=semver,pattern={{version}}
+1
View File
@@ -176,6 +176,7 @@ export default (app: Router) => {
path,
`${originFilename.replace(/\//g, '')}`,
);
await fs.mkdir(path, { recursive: true });
const filePath = join(path, `${filename.replace(/\//g, '')}`);
const fileExists = await fileExist(filePath);
if (fileExists) {
-11
View File
@@ -19,17 +19,6 @@ export class HttpServerService {
resolve(this.server);
});
// Configure server timeouts for better compatibility with reverse proxies
// Set keepAliveTimeout to 65 seconds (longer than Apache's default KeepAliveTimeout of 5s)
// This prevents "Connection reset by peer" errors with Apache reverse proxy
if (this.server) {
this.server.keepAliveTimeout = 65000; // 65 seconds
// headersTimeout should be slightly longer than keepAliveTimeout
this.server.headersTimeout = 66000; // 66 seconds
// Set a reasonable request timeout
this.server.requestTimeout = 120000; // 120 seconds
}
this.server?.on('error', (err: Error) => {
Logger.error('Failed to start HTTP service:', err);
reject(err);
+1 -1
View File
@@ -16,7 +16,7 @@ const SaveModal = ({
const handleOk = async (values: any) => {
setLoading(true);
const payload = { ...file, ...values, originFilename: file.title };
const payload = { ...values, originFilename: file.title, content: file.content };
request
.post(`${config.apiPrefix}scripts`, payload)
.then(({ code, data }) => {