mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
Added switch --insecure to allow imports from insecure/self-signed SSL certificates
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
'contents', // browser-only, contents of all the files
|
||||
'relativeUrls', // option - whether to adjust URL's to be relative
|
||||
'strictImports', // option -
|
||||
'insecure', // option - whether to allow imports from insecure ssl hosts
|
||||
'dumpLineNumbers', // option - whether to dump line numbers
|
||||
'compress', // option - whether to compress
|
||||
'processImports', // option - whether to process imports. if false then imports will not be imported
|
||||
|
||||
@@ -161,7 +161,7 @@ less.Parser.importer = function (file, currentFileInfo, callback, env) {
|
||||
path: urlObj.pathname + (urlObj.search||'')
|
||||
};
|
||||
|
||||
request.get(urlStr, function (error, res, body) {
|
||||
request.get({uri: urlStr, strictSSL: !env.insecure }, function (error, res, body) {
|
||||
if (res.statusCode === 404) {
|
||||
callback({ type: 'File', message: "resource '" + urlStr + "' was not found\n" });
|
||||
return;
|
||||
|
||||
@@ -36,6 +36,7 @@ var lessc_helper = {
|
||||
sys.puts(" -l, --lint Syntax check only (lint).");
|
||||
sys.puts(" -s, --silent Suppress output of error messages.");
|
||||
sys.puts(" --strict-imports Force evaluation of imports.");
|
||||
sys.puts(" --insecure Allow imports from insecure https hosts.");
|
||||
sys.puts(" --verbose Be verbose.");
|
||||
sys.puts(" -v, --version Print version number and exit.");
|
||||
sys.puts(" -x, --compress Compress output by removing some whitespaces.");
|
||||
|
||||
Reference in New Issue
Block a user