express = require('express');
app.get("/proxy*", function (request, response) {
options = {
host: rmHost,
port: 4000,
path: request.originalUrl,
method: 'GET',
headers: {
secure: false
}
};
console.log(request.originalUrl);
http.get(options, (resp) => {
let data = '';
resp.on('data', function(chunk) {
data += chunk;
});
resp.on('end', () => {
response.write(data);
response.end()
});
}).on("error", (err) => {
response.write("Error: " + err.message);
});
});
内容未完全转移到客户端,并出现以下错误:
未捕获的SyntaxError:意外令牌< jquery-ui-1.9.1.custom.min.js:1
未捕获到的SyntaxError:意外令牌>
未捕获到的SyntaxError:意外令牌<< / p>
test.dt.plugins.js:18 未捕获的ReferenceError:未定义jQuery 未捕获的ReferenceError:未定义$
at test.dt.plugins.js:18 RUNNING:38
at RUNNING:38 RUNNING:53