UNPKG

sicarii

Version:

The zero dependency http2 nodejs multithreading framework

512 lines (511 loc) 12.1 kB
{ "port": 8080, "origin": "https://localhost", "verbose": true, "dev": true, "proxy": false, "ip_config": "/config/ip_config", "pre_cache": "/config/pre_cache", "push_handler": { "enabled": false, "accept": ["text/html"], "path": "/config/push" }, "cluster": { "workers": 2, "settings": { "serialization": "json" } }, "sync": { "respawn": true }, "session": { "path": "/store/session/db.json", "maxage": 1000000, "secret": "" }, "cache": { "url": "https://localhost:5000", "path": "/store/cache/", "port": 5000, "timeout": 5000, "proxy": false, "authtoken": { "enabled": false, "header": "X-Authtoken", "token": "12345" }, "whitelist": { "enabled": false, "ip": ["::ffff:127.0.0.1"] }, "server": { "rejectUnauthorized": false, "requestCert": false }, "headers": { "Origin": "https://localhost", "Content-Type": "application/json", "Method": "POST", "X-Frame-Options": "DENY", "Referrer-Policy": "no-referrer", "Server": "Nodejs", "Access-Control-Allow-Origin": "*", "Access-Control-Allow-Methods": "POST", "X-DNS-Prefetch-Control": "on", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-XSS-Protection": "1", "Access-Control-Allow-Headers": "*" } }, "cookie_parser": { "enabled": true, "auto_parse": true, "sig": { "secret": "secret", "suffix": "sig" } }, "stream": { "path_limit": 100, "case_sensitive": false, "param_limit": 1000, "body_limit": 5000, "methods": ["get", "connect", "post", "put", "delete", "head"], "querystring": true, "method_body": ["post", "delete", "patch", "put"], "method_query": ["get", "connect", "head", "options", "trace"], "content_types": ["application/json", "text/plain", "multipart/form-data", "application/x-www-form-urlencoded"] }, "fetch": { "timeout": 5000 }, "blacklist": { "enabled": false, "msg": "your ip has been blacklisted" }, "whitelist": { "enabled": false, "msg": "Unauthorized" }, "authtoken": { "enabled": false, "header": "X-Authtoken", "token": "xxxxxx", "msg": "offline" }, "server": { "rejectUnauthorized": false, "requestCert": false }, "ssl": { "cert": "/cert/localhost.cert", "key": "/cert/localhost.key" }, "store": { "path": "/store/store/db.json" }, "uploads": { "enabled": true, "path": "/uploads", "recursive": true, "gzip": true, "brotli": false, "mimetypes": { "application/json": ["json"] }, "max_filename": 30, "max_filesize": 50000 }, "static": { "path": "/static", "blocked": [], "etag": { "enabled": true, "digest": "sha3-256", "encode": "base64" }, "cache": { "enabled": false, "maxage": 100000 }, "headers": { "Server": "Nodejs" } }, "render": { "path": "/render", "blocked": [], "etag": { "enabled": true, "digest": "sha3-256", "encode": "base64" }, "cache": { "enabled": false, "maxage": 1000000 }, "headers": { "X-Frame-Options": "DENY", "Referrer-Policy": "no-referrer", "Server": "Nodejs", "Access-Control-Allow-Origin": "*", "Access-Control-Allow-Methods": "GET POST", "X-DNS-Prefetch-Control": "on", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", "X-XSS-Protection": "1", "Access-Control-Allow-Headers": "*" } }, "compression": { "gzip": { "enabled": true, "prezipped": false, "ext": ".gz", "settings": { "level": 9, "memLevel": 9, "strategy": 0 } }, "brotli": { "enabled": false, "prezipped": false, "ext": ".br", "settings": {} }, "deflate": { "enabled": false, "prezipped": false, "ext": ".dfl", "settings": { "level": 9, "memLevel": 9, "strategy": 0 } } }, "cors": { "origin": "", "methods": "", "allow_headers": "", "expose_headers": "", "credentials": true, "maxage": 9999 }, "csp": { "default": "default-src 'self'" }, "feature_policy": { "default": "microphone 'none'; geolocation 'none'" }, "logs": { "path": "/logs", "separator": "|", "logs": ["error", "history", "ip"], "console_error": false, "compression": "gzip", "cron": 3000, "encodeURIComponent": false, "error": { "enabled": false, "max_size": 5000, "base_name": "error", "ext": ".txt" }, "history": { "enabled": false, "max_size": 5000, "base_name": "history", "ext": ".txt" }, "ip": { "enabled": false, "max_size": 5000, "base_name": "ip", "ext": ".txt", "log_time": true, "log_path": true } }, "template_engine": { "engines": [ "basic", "poorboy", "nunjucks", "ejs", "pug", "mustache", "twig", "squirrelly", "ect", "eta", "liquidjs" ], "basic": { "enabled": true, "settings": { "pretty": false, "filters": {}, "cache": false } }, "squirrelly": { "enabled": false, "settings": {} }, "eta": { "enabled": false, "settings": {} }, "liquidjs": { "enabled": false, "settings": { "extname": ".liquid" } }, "ect": { "enabled": false, "settings": { "cache": false, "open": "<%", "close": "%>" } }, "poorboy": { "enabled": false, "settings": { "use_globals": false, "globals": {} } }, "nunjucks": { "enabled": false, "jinjacompat": true, "filters": "", "globals": { "enabled": false, "vars": {} }, "settings": { "autoescape": true, "noCache": true, "throwOnUndefined": false, "trimBlocks": false, "lstripBlocks": false, "tags": {} } }, "ejs": { "enabled": false, "settings": {} }, "pug": { "enabled": false, "settings": { "pretty": false, "filters": {}, "cache": false } }, "mustache": { "enabled": false, "tags": ["{{", "}}"], "settings": {} }, "twig": { "enabled": false, "settings": {} } }, "mimetypes": { "text/html": ["html", "htm", "shtml"], "text/css": ["css"], "application/javascript": ["js", "mjs"], "image/x-icon": ["ico"], "font/woff": ["woff"], "font/woff2": ["woff2"], "image/jpeg": ["jpeg", "jpg"], "image/png": ["png"], "font/collection": ["ttc"], "font/otf": ["otf"], "font/ttf": ["ttf"], "image/svg+xml": ["svg", "svgz"], "application/xhtml+xml": ["xhtml", "xht"], "application/json": ["json", "map"], "application/gzip": ["gz"], "application/atom+xml": ["atom"], "application/atomcat+xml": ["atomcat"], "application/atomdeleted+xml": ["atomdeleted"], "application/atomsvc+xml": ["atomsvc"], "application/ecmascript": ["ecma", "es"], "application/epub+zip": ["epub"], "application/geo+json": ["geojson"], "application/hjson": ["hjson"], "application/json5": ["json5"], "application/jsonml+json": ["jsonml"], "application/ld+json": ["jsonld"], "application/manifest+json": ["webmanifest"], "application/mp4": ["mp4s", "m4p"], "application/msword": ["doc", "dot"], "application/node": ["cjs"], "application/octet-stream": ["bin", "so", "pkg", "img", "buffer"], "application/ogg": ["ogx"], "application/pdf": ["pdf"], "application/pgp-encrypted": ["pgp"], "application/pgp-signature": ["asc", "sig"], "application/pkcs10": ["p10"], "application/pkcs7-mime": ["p7m", "p7c"], "application/pkcs7-signature": ["p7s"], "application/pkcs8": ["p8"], "application/wasm": ["wasm"], "application/xaml+xml": ["xaml"], "application/xliff+xml": ["xlf"], "application/xml": ["xml", "xsl", "xsd", "rng"], "application/zip": ["zip"], "audio/3gpp": ["3gpp"], "audio/mp3": ["mp3"], "audio/mp4": ["m4a", "mp4a"], "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"], "audio/ogg": ["oga", "ogg", "spx"], "audio/wav": ["wav"], "audio/webm": ["weba"], "image/apng": ["apng"], "image/bmp": ["bmp"], "image/cgm": ["cgm"], "image/gif": ["gif"], "image/sgi": ["sgi"], "image/tiff": ["tif", "tiff"], "image/tiff-fx": ["tfx"], "image/webp": ["webp"], "text/cache-manifest": ["appcache", "manifest"], "text/coffeescript": ["coffee", "litcoffee"], "text/csv": ["csv"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["markdown", "md"], "text/mathml": ["mml"], "text/mdx": ["mdx"], "text/plain": ["txt", "text", "conf", "log", "ini"], "text/richtext": ["rtx"], "text/stylus": ["stylus", "styl"], "text/uri-list": ["uri", "uris", "urls"], "text/vcard": ["vcard"], "text/vtt": ["vtt"], "text/xml": ["xml"], "text/yaml": ["yaml", "yml"], "video/3gpp": ["3gp", "3gpp"], "video/3gpp2": ["3g2"], "video/jpeg": ["jpgv"], "video/mp2t": ["ts"], "video/mp4": ["mp4", "mp4v", "mpg4"], "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"], "video/ogg": ["ogv"], "video/quicktime": ["qt", "mov"], "video/webm": ["webm"], "application/vnd.android.package-archive": ["apk"], "image/x-ms-bmp": ["bmp"], "text/x-sass": ["sass"], "text/x-scss": ["scss"], "video/x-f4v": ["f4v"], "video/x-flv": ["flv"], "video/x-m4v": ["m4v"], "video/x-matroska": ["mkv", "mk3d", "mks"], "video/x-ms-wmv": ["wmv"] }, "crypt": { "jwt": { "secret": "secret", "digest": "sha256", "encode": "base64", "separator": ":", "header": { "typ": "JWT", "alg": "HS256" }, "claims": { "iss": "token issuer", "sub": "token subject", "aud": "token audience", "exp": 5000000, "nbf": 0 } }, "hmac": { "secret": "secret", "digest": "sha3-256", "encode": "hex" }, "pbkdf2": { "digest": "sha3-512", "encode": "hex", "iterations": 50000 }, "scrypt": { "encode": "hex", "cost": 16384, "blockSize": 8, "parallelization": 1 }, "encryption": { "secret": "", "secret_len": 32, "iterations": 60000, "digest": "sha3-512", "settings": { "cipher": "aes", "bit_len": "256", "iv_len": 32, "tag_len": 16, "encode": "hex", "mode": "gcm" } }, "ecdsa": { "curve": "secp521r1", "encode": "hex", "hash": "sha3-512", "privateKey": { "type": "sec1", "format": "der" }, "publicKey": { "type": "spki", "format": "der" } }, "ecdh": { "curve": "secp521r1", "encode": "hex" }, "rsa": { "length": 4096, "publicExponent": 65537, "encode": "hex", "oaepHash": "sha512", "publicKey": { "type": "pkcs1", "format": "pem" }, "privateKey": { "type": "pkcs8", "format": "pem" } }, "otp": { "rounds": 1, "iterations": 10000, "digest": "sha512", "encode": "hex" } }, "bot": { "detect": { "items": [ "Google-Structured-Data-Testing-Tool", "Googlebot","bingbot","Slurp", "DuckDuckBot","Baiduspider","YandexBot","Exabot","facebot", "facebookexternalhit","ia_archiver" ] }, "block": { "enabled": false, "msg": "Unauthorized", "items": [] } } }