修复 nginx 转发stream接口失效,停止运行命令支持 pid 参数

This commit is contained in:
whyour
2023-05-04 21:28:14 +08:00
parent 01b404765e
commit 8b8bd279c6
4 changed files with 23 additions and 6 deletions
+2 -1
View File
@@ -14,6 +14,7 @@ import handler from 'serve-handler';
import * as Sentry from '@sentry/node';
import { EnvModel } from '../data/env';
import { errors } from 'celebrate';
import path from 'path';
export default ({ app }: { app: Application }) => {
app.enable('trust proxy');
@@ -25,7 +26,7 @@ export default ({ app }: { app: Application }) => {
next();
} else {
return handler(req, res, {
public: 'static/dist',
public: path.join(config.rootPath, 'static/dist'),
rewrites: [{ source: '**', destination: '/index.html' }],
});
}