Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
4f1db106fb | |||
d47829a8b2 |
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@pushrocks/smartproxy",
|
||||
"version": "3.0.7",
|
||||
"version": "3.0.8",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@pushrocks/smartproxy",
|
||||
"version": "3.0.7",
|
||||
"version": "3.0.8",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@pushrocks/lik": "^6.0.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/smartproxy",
|
||||
"version": "3.0.7",
|
||||
"version": "3.0.8",
|
||||
"private": false,
|
||||
"description": "a proxy for handling high workloads of proxying",
|
||||
"main": "dist_ts/index.js",
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@pushrocks/smartproxy',
|
||||
version: '3.0.7',
|
||||
version: '3.0.8',
|
||||
description: 'a proxy for handling high workloads of proxying'
|
||||
}
|
||||
|
@ -117,9 +117,6 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
|
||||
`,
|
||||
},
|
||||
async (req, res) => {
|
||||
console.log('got request');
|
||||
const destinationConfig = this.router.routeReq(req);
|
||||
|
||||
/**
|
||||
* endRequest function
|
||||
* can be used to prematurely end a request
|
||||
@ -133,6 +130,15 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
|
||||
res.end(messageArg);
|
||||
};
|
||||
|
||||
console.log('got request');
|
||||
const destinationConfig = this.router.routeReq(req);
|
||||
|
||||
if (!destinationConfig) {
|
||||
console.log(`${req.headers.host} can't be routed properly. Terminating request.`);
|
||||
endRequest();
|
||||
return;
|
||||
}
|
||||
|
||||
// authentication
|
||||
if (destinationConfig.authentication) {
|
||||
const authInfo = destinationConfig.authentication;
|
||||
|
Reference in New Issue
Block a user