update
This commit is contained in:
@@ -170,6 +170,17 @@ router.get('/api/container/file/:id', async (req, res) => {
|
||||
res.end(JSON.stringify(container));
|
||||
});
|
||||
|
||||
router.all('/api/nocodb-test/router', async (req, res) => {
|
||||
res.writeHead(200, { 'Content-Type': 'application/json' });
|
||||
|
||||
const param = await router.getSearch(req);
|
||||
const body = await router.getBody(req);
|
||||
|
||||
const contentType = req.headers['content-type'] || '';
|
||||
console.log('Content-Type:', contentType);
|
||||
console.log('NocoDB test router called.', req.method, param, JSON.stringify(body, null));
|
||||
res.end(JSON.stringify({ message: 'NocoDB test router is working' }));
|
||||
});
|
||||
const simpleAppsPrefixs = [
|
||||
"/api/app/",
|
||||
"/api/micro-app/",
|
||||
@@ -177,9 +188,11 @@ const simpleAppsPrefixs = [
|
||||
"/api/s1/",
|
||||
"/api/container/",
|
||||
"/api/resource/",
|
||||
"/api/wxmsg"
|
||||
"/api/wxmsg",
|
||||
"/api/nocodb-test/"
|
||||
];
|
||||
|
||||
|
||||
export const handleRequest = async (req: http.IncomingMessage, res: http.ServerResponse) => {
|
||||
if (req.url?.startsWith('/api/router')) {
|
||||
// router自己管理
|
||||
|
||||
Reference in New Issue
Block a user