mirror of
https://github.com/whyour/qinglong.git
synced 2026-08-06 00:34:33 +08:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9702d246db | |||
| 8676010ad0 | |||
| 1776eb58fb |
@@ -164,7 +164,7 @@ jobs:
|
||||
flavor: |
|
||||
latest=false
|
||||
tags: |
|
||||
type=ref,event=branch,enable=${{ github.ref == format('refs/heads/{0}', 'develop') }}
|
||||
type=ref,event=branch,enable=${{ github.ref != format('refs/heads/{0}', 'master') }}
|
||||
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}}
|
||||
|
||||
@@ -176,7 +176,6 @@ 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) {
|
||||
|
||||
@@ -107,7 +107,7 @@ export default class DependenceService {
|
||||
query: any = {},
|
||||
): Promise<Dependence[]> {
|
||||
let condition = query;
|
||||
if (type && DependenceTypes[type] !== undefined) {
|
||||
if (DependenceTypes[type]) {
|
||||
condition.type = DependenceTypes[type];
|
||||
}
|
||||
if (status) {
|
||||
|
||||
@@ -19,6 +19,17 @@ 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);
|
||||
|
||||
@@ -16,7 +16,7 @@ const SaveModal = ({
|
||||
|
||||
const handleOk = async (values: any) => {
|
||||
setLoading(true);
|
||||
const payload = { ...values, originFilename: file.title, content: file.content };
|
||||
const payload = { ...file, ...values, originFilename: file.title };
|
||||
request
|
||||
.post(`${config.apiPrefix}scripts`, payload)
|
||||
.then(({ code, data }) => {
|
||||
|
||||
Reference in New Issue
Block a user