This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| var vsm = require('lrs/virtualServerModule'); | |
| var parseRange = require('range-parser'); | |
| // Change config as needed. | |
| var config = { | |
| vs: 'vs_http', // name of virtual-server | |
| max_range_value: 1e9, // 1 GB | |
| max_ranges: 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "use strict"; | |
| var vsm = require("lrs/virtualServerModule"); | |
| var cookie = require("cookie"); | |
| var async = require("async"); | |
| var memcache = require('memcache'); | |
| // Change config as needed. | |
| var config = { | |
| session_id_key: "connect.sid", // session-id key being used |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| var vsm = require('lrs/virtualServerModule'); | |
| var trailing_slash_re = /\/$/; | |
| vsm.on('exist', 'vs_http', function (vs) { | |
| console.log("Script ' + __scriptname + | |
| ' installed on Virtual Server ' + | |
| vs.id + '"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| var vsm = require('lrs/virtualServerModule'); | |
| vsm.on('exist', 'vs_http', function (vs) { | |
| console.log("Script ' + __scriptname + | |
| ' installed on Virtual Server ' + | |
| vs.id + '"); | |
| vs.on('request', function (servReq, servResp, cliReq) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| var vsm = require('lrs/virtualServerModule'); | |
| var url = require('url'); | |
| var cookie = require('cookie'); | |
| // append this to image names for highres | |
| var suffix = '@2x'; | |
| // image types to check for highres |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| var http = require('http'); | |
| var port = process.argv[2] || 15000; | |
| var ip = process.argv[3] || '127.0.0.1'; | |
| var counter = 0; | |
| http.createServer(function (req, res) { | |
| req.setEncoding('utf8'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| var vsm = require('lrs/virtualServerModule'); | |
| var domain_whitelist = [ | |
| /^.*\.?example\.com$/, | |
| /^.*\.?other-permitted-site\.com$/ | |
| ]; | |
| vsm.on('exist', 'vs_http', function (vs) { |