|
@@ -67,13 +67,13 @@ async function Main() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function checkHandleRequest() {
|
|
function checkHandleRequest() {
|
|
|
|
|
+ handleHeaders();
|
|
|
const request = magicJS.request;
|
|
const request = magicJS.request;
|
|
|
const url = request.url;
|
|
const url = request.url;
|
|
|
const path = request.path;
|
|
const path = request.path;
|
|
|
magicJS.log(`请求url=${url}#${request.method}`);
|
|
magicJS.log(`请求url=${url}#${request.method}`);
|
|
|
magicJS.log(`请求body=${magicJS.getRequestBody()}`);
|
|
magicJS.log(`请求body=${magicJS.getRequestBody()}`);
|
|
|
printResponseData();
|
|
printResponseData();
|
|
|
- handleHeaders();
|
|
|
|
|
if ($request && $request.method != 'OPTIONS') {
|
|
if ($request && $request.method != 'OPTIONS') {
|
|
|
switch (path) {
|
|
switch (path) {
|
|
|
case '/api/app/blackOrWhite':
|
|
case '/api/app/blackOrWhite':
|