Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hrt

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hrt - npm Package Compare versions

Comparing version 1.0.15 to 1.0.16

tudou.ico

3

changelog.txt

@@ -7,2 +7,5 @@ #######################################################################

ver 1.0.16
* 改进:土豆插件支持多层相对路径。
ver 1.0.15

@@ -9,0 +12,0 @@ * 改进:土豆插件改进。

34

config/default.js
exports.serverRoot = 'd:\\htdocs\\tudou.com\\static';
exports.serverRoot = 'd:\\work\\static';

@@ -7,17 +7,25 @@ exports.map = [

//['http://js.tudouui.com/js/lib/tuilib2.js', exports.serverRoot + '/js/lib/tuilib2_src.js'],
//['http://jstest.tudouui.com/js/page/play/v4/main.js', exports.serverRoot + '/js/page/play/v4/main_src.js'],
//['http://js.tudouui.com/js/fn/flashloader2.js', exports.serverRoot + '/js/fn/flashloader2_src.js'],
//['http://js.tudouui.com/js/page/play/v4/main.js', exports.serverRoot + '/js/page/play/v4/main_src.js'],
//['http://js.tudouui.com/js/page/play/v4/comment.js', exports.serverRoot + '/js/page/play/v4/comment_src.js'],
//['http://css.tudouui.com/skin/play/v4/play.css', exports.serverRoot + '/skin/play/v4/play_src.css'],
//['http://js.tudouui.com/js/delate.js', exports.serverRoot + '/js/delate_src.js'],
//['http://css.tudouui.com/skin/play/v4/play.css', exports.serverRoot + '/skin/play/v4/play_combo.css'],
//['http://js.tudouui.com/js/fn/flashloader2.js', exports.serverRoot + '/js/fn/flashloader2.js'],
//['http://js.tudouui.com/js/page/play/v4/comment.js', exports.serverRoot + '/js/page/play/v4/comment_combo.js'],
//['http://css.tudouui.com/skin/play/v4/img/icon_wt5.png', exports.serverRoot + '/skin/play/v4/img/icon_wt5.png'],
//['http://js.tudouui.com/bin/lingtong/PortalPlayer.swf', 'http://jstest.tudouui.com/bin/lingtong/PortalPlayer_adtest_12.swf'],
//['http://css.tudouui.com/skin/play/v4/img/bg_v7.png', exports.serverRoot + '/skin/play/v4/img/bg_v7.png'],
//wwwtest环境
//['http://jstest.tudouui.com/js/lib/tuilib2.js', exports.serverRoot + '/js/lib/tuilib2_src.js'],
//['http://jstest.tudouui.com/js/fn/flashloader2.js', exports.serverRoot + '/js/fn/flashloader2_src.js'],
//['http://jstest.tudouui.com/js/page/play/v4/main.js', exports.serverRoot + '/js/page/play/v4/main_src.js'],
//['http://jstest.tudouui.com/js/page/play/v4/comment.js', exports.serverRoot + '/js/page/play/v4/comment_src.js'],
//['http://csstest.tudouui.com/skin/play/v4/play.css', exports.serverRoot + '/skin/play/v4/play_src.css'],
//['http://csstest.tudouui.com/skin/play/v4/img/pcapp.png', exports.serverRoot + '/skin/play/v4/img/pcapp.png'],
['http://jstest.tudouui.com/bin/lingtong/PortalPlayer.swf', 'http://10.5.28.37/ad/tudouPlayer.swf'],
//['http://jstest.tudouui.com/js/lib/tuilib2.js', 'http://js.tudouui.com/js/lib/tuilib2.js'],
//['http://jstest.tudouui.com/js/lib/tuilib2.js', 'http://jstest.tudouui.com/js/lib/tuilib2_298.js'],
['http://jstest.tudouui.com/js/lib/tuilib2.js', exports.serverRoot + '/js/lib/tuilib2_combo.js'],
//['http://csstest.tudouui.com/skin/__g/__g.css', exports.serverRoot + '/skin/__g/__g_src.css'],
//['http://wwwtest.tudou.com/feeportal/hasRule.html', 'http://localhost/json.php'],
['http://jstest.tudouui.com/js/fn/flashloader2.js', exports.serverRoot + '/js/fn/flashloader2_src.js'],
['http://jstest.tudouui.com/js/page/play/v4/main.js', exports.serverRoot + '/js/page/play/v4/main_src.js'],
['http://jstest.tudouui.com/js/page/play/v4/comment.js', exports.serverRoot + '/js/page/play/v4/comment_src.js'],
['http://csstest.tudouui.com/skin/play/v4/play.css', exports.serverRoot + '/skin/play/v4/play_src.css'],
//['http://csstest.tudouui.com/skin/play/v4/img/bg_v8.png', exports.serverRoot + '/skin/play/v4/img/bg_v8.png'],
//['http://csstest.tudouui.com/skin/play/v4/img/icon_wt5.png', exports.serverRoot + '/skin/play/v4/img/icon_wt5.png'],
//['http://jstest.tudouui.com/v3/dist/js/autodomain.js', exports.serverRoot + '/autodomain.js'],
//['http://csstest.tudouui.com/skin/play/v4/img/nocomment_2.png', exports.serverRoot + '/skin/play/v4/img/nocomment_2.png'],
//['http://jstest.tudouui.com/bin/lingtong/PortalPlayer.swf', exports.serverRoot + '/bin/lingtong/PortalPlayer_WT1.swf'],

@@ -24,0 +32,0 @@ ];

{
"name": "hrt",
"version": "1.0.15",
"version": "1.0.16",
"description": "HTTP Rewrite Tool",

@@ -5,0 +5,0 @@ "author": "Longhao Luo <lhluo@tudou.com>",

@@ -26,2 +26,13 @@ var Fs = require('fs');

function resolveUrl(url) {
while(true) {
url = url.replace(/\w+\/\.\.\//g, '');
if (!/\.\.\//.test(url)) {
break;
}
}
url = url.replace(/\.\//g, '');
return url;
}
function fixDep(s, format) {

@@ -35,3 +46,3 @@ if (format) {

f = relativePath.replace(/[\w-]+\.js$/, '') + f;
f = f.replace(/\w+\/\.\.\//g, '').replace(/\.\//g, '');
f = resolveUrl(f);
}

@@ -65,3 +76,3 @@ else if(f.charAt(0) == '/') {

if(!/(?:^|[^\w\.])(define|require)\s*\(/.test(str)) {
return str += '\n/* autogeneration */\ndefine("' + mid + '", [], function(){});\n';
return str += '\n/* autogeneration */\n"define" in this && define("' + mid + '", [], function(){});\n';
}

@@ -77,3 +88,3 @@

f = path.replace(/[\w-]+\.js$/, '') + f;
f = f.replace(/\w+\/\.\.\//g, '').replace(/\.\//g, '');
f = resolveUrl(f);
}

@@ -80,0 +91,0 @@ var s = '';

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc