mirror of
https://github.com/whyour/qinglong.git
synced 2026-08-06 08:44:32 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ee8fb68839 | |||
| eaafaf3dfc |
@@ -28,7 +28,3 @@ __pycache__
|
||||
/shell/preload/notify.*
|
||||
/shell/preload/*-notify.json
|
||||
/shell/preload/__ql_notify__.*
|
||||
|
||||
# Test files
|
||||
test-*.cjs
|
||||
test-*.mjs
|
||||
|
||||
@@ -22,6 +22,14 @@ export default ({ app }: { app: Application }) => {
|
||||
app.use(rewrite(`${config.baseUrl}/*`, '/$1'));
|
||||
}
|
||||
|
||||
// Normalize URL path to lowercase to prevent authentication bypass via mixed-case paths
|
||||
// e.g. /API/system/command-run should not bypass JWT checks designed for /api/...
|
||||
// The regex only matches the path portion (stops at ? or #), preserving query strings.
|
||||
app.use((req: Request, res: Response, next: NextFunction) => {
|
||||
req.url = req.url.replace(/^[^?#]*/, (p) => p.toLowerCase());
|
||||
next();
|
||||
});
|
||||
|
||||
app.get(`${config.api.prefix}/env.js`, serveEnv);
|
||||
app.use(`${config.api.prefix}/static`, express.static(config.uploadPath));
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import config from '@/utils/config';
|
||||
import { request } from '@/utils/http';
|
||||
import { MinusCircleOutlined, PlusOutlined } from '@ant-design/icons';
|
||||
import { Button, Form, Input, Modal, Select, Space, message } from 'antd';
|
||||
import { CronExpressionParser } from 'cron-parser';
|
||||
import CronExpressionParser from 'cron-parser';
|
||||
import { useEffect, useState } from 'react';
|
||||
import intl from 'react-intl-universal';
|
||||
import { getScheduleType, scheduleTypeMap } from './const';
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
} from 'antd';
|
||||
import { request } from '@/utils/http';
|
||||
import config from '@/utils/config';
|
||||
import { CronExpressionParser } from 'cron-parser';
|
||||
import CronExpressionParser from 'cron-parser';
|
||||
import isNil from 'lodash/isNil';
|
||||
|
||||
const { Option } = Select;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import intl from 'react-intl-universal';
|
||||
import { LANG_MAP, LOG_END_SYMBOL } from './const';
|
||||
import { CronExpressionParser } from 'cron-parser';
|
||||
import CronExpressionParser from 'cron-parser';
|
||||
import { ICrontab } from '@/pages/crontab/type';
|
||||
|
||||
export default function browserType() {
|
||||
|
||||
Reference in New Issue
Block a user