1
0
Fork 0
forked from svrjs/svrjs

Update to SVR.JS 3.12.0

This commit is contained in:
Dorian Niemiec 2023-12-03 16:19:34 +01:00
parent a63e1a893b
commit 19f7345762
5 changed files with 395 additions and 292 deletions

View file

@ -3,7 +3,7 @@
"port": 80, "port": 80,
"pubport": 80, "pubport": 80,
"page404": "404.html", "page404": "404.html",
"timestamp": 1692493855777, "timestamp": 1701600932028,
"blacklist": [], "blacklist": [],
"nonStandardCodes": [], "nonStandardCodes": [],
"enableCompression": true, "enableCompression": true,
@ -89,14 +89,22 @@
"dontCompress": [ "dontCompress": [
"/.*\\.ipxe$/", "/.*\\.ipxe$/",
"/.*\\.img$/", "/.*\\.img$/",
"/.*\\.iso$/" "/.*\\.iso$/",
"/.*\\.png$/",
"/.*\\.jpg$/",
"/.*\\.webp$/"
], ],
"enableIPSpoofing": false, "enableIPSpoofing": true,
"secure": false, "secure": false,
"sni": {}, "sni": {},
"disableNonEncryptedServer": false, "disableNonEncryptedServer": false,
"disableToHTTPSRedirect": false, "disableToHTTPSRedirect": false,
"enableETag": true, "enableETag": true,
"disableUnusedWorkerTermination": false, "disableUnusedWorkerTermination": false,
"rewriteDirtyURLs": false "rewriteDirtyURLs": true,
"errorPages": [],
"useWebRootServerSideScript": true,
"exposeModsInErrorPages": true,
"disableTrailingSlashRedirects": false,
"environmentVariables": {}
} }

View file

@ -25,7 +25,7 @@
&nbsp;&nbsp;"port": 80,<br/> &nbsp;&nbsp;"port": 80,<br/>
&nbsp;&nbsp;"pubport": 80,<br/> &nbsp;&nbsp;"pubport": 80,<br/>
&nbsp;&nbsp;"page404": "404.html",<br/> &nbsp;&nbsp;"page404": "404.html",<br/>
&nbsp;&nbsp;"timestamp": 1680954429282,<br/> &nbsp;&nbsp;"timestamp": 1701600932028,<br/>
&nbsp;&nbsp;"blacklist": [],<br/> &nbsp;&nbsp;"blacklist": [],<br/>
&nbsp;&nbsp;"nonStandardCodes": [],<br/> &nbsp;&nbsp;"nonStandardCodes": [],<br/>
&nbsp;&nbsp;"enableCompression": true,<br/> &nbsp;&nbsp;"enableCompression": true,<br/>
@ -40,6 +40,7 @@
&nbsp;&nbsp;"exposeServerVersion": true,<br/> &nbsp;&nbsp;"exposeServerVersion": true,<br/>
&nbsp;&nbsp;"disableServerSideScriptExpose": true,<br/> &nbsp;&nbsp;"disableServerSideScriptExpose": true,<br/>
&nbsp;&nbsp;"rewriteMap": [<br/> &nbsp;&nbsp;"rewriteMap": [<br/>
&nbsp;&nbsp;&nbsp;&nbsp;{<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"definingRegex": "/^\\/serverSideScript\\.js(?:$|[#?])/",<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"definingRegex": "/^\\/serverSideScript\\.js(?:$|[#?])/",<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"replacements": [<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"replacements": [<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br/>
@ -104,23 +105,41 @@
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"replacement": "/invoke500.svr"<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"replacement": "/invoke500.svr"<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]<br/>
&nbsp;&nbsp;&nbsp;&nbsp;}<br/> &nbsp;&nbsp;],<br/> &nbsp;&nbsp;&nbsp;&nbsp;}<br/>
&nbsp;&nbsp;],<br/>
&nbsp;&nbsp;"allowStatus": true,<br/> &nbsp;&nbsp;"allowStatus": true,<br/>
&nbsp;&nbsp;"dontCompress": ["/.*\\.ipxe$/","/.*\\.img$/","/.*\\.iso$/"],<br/> &nbsp;&nbsp;"dontCompress": [<br/>
&nbsp;&nbsp;"enableIPSpoofing": false,<br/> &nbsp;&nbsp;&nbsp;&nbsp;"/.*\\.ipxe$/",<br/>
&nbsp;&nbsp;&nbsp;&nbsp;"/.*\\.img$/",<br/>
&nbsp;&nbsp;&nbsp;&nbsp;"/.*\\.iso$/",<br/>
&nbsp;&nbsp;&nbsp;&nbsp;"/.*\\.png$/",<br/>
&nbsp;&nbsp;&nbsp;&nbsp;"/.*\\.jpg$/",<br/>
&nbsp;&nbsp;&nbsp;&nbsp;"/.*\\.webp$/"<br/>
&nbsp;&nbsp;],<br/>
&nbsp;&nbsp;"enableIPSpoofing": true,<br/>
&nbsp;&nbsp;"secure": false,<br/> &nbsp;&nbsp;"secure": false,<br/>
&nbsp;&nbsp;"sni": {},<br/> &nbsp;&nbsp;"sni": {},<br/>
&nbsp;&nbsp;"disableNonEncryptedServer": false,<br/> &nbsp;&nbsp;"disableNonEncryptedServer": false,<br/>
&nbsp;&nbsp;"disableToHTTPSRedirect": false<br/> &nbsp;&nbsp;"disableToHTTPSRedirect": false,<br/>
&nbsp;&nbsp;"enableETag": true,<br/>
&nbsp;&nbsp;"disableUnusedWorkerTermination": false,<br/>
&nbsp;&nbsp;"rewriteDirtyURLs": true,<br/>
&nbsp;&nbsp;"errorPages": [],<br/>
&nbsp;&nbsp;"useWebRootServerSideScript": true,<br/>
&nbsp;&nbsp;"exposeModsInErrorPages": true,<br/>
&nbsp;&nbsp;"disableTrailingSlashRedirects": false,<br/>
&nbsp;&nbsp;"environmentVariables": {}<br/>
} }
</code> </code>
</div> </div>
<p>Changes:</p> <p>Changes:</p>
<ul> <ul>
<li>SVR.JS now sends configuration file saving request to one random good worker instead of all workers to prevent configuration file corruption.</li> <li>Added trailing slash redirect support.</li>
<li>Fixed crashes due to destroyed HTTP/2 stream (Node.JS bug: <a href="https://github.com/nodejs/node/issues/24470">https://github.com/nodejs/node/issues/24470</a>)</li> <li>Added new <i>config.json</i> property &mdash; <i>environmentVariables</i>.</li>
<li>Fixed language errors in HTTP error code descriptions, error console messages and the index page.</li> <li>Replaces base 1000 size prefixes with base 1024 ones.</li>
<li>Updated the logo in the SVR.JS log viewer.</li> <li>Invalid compression exclusion list regexes no longer crash SVR.JS.</li>
<li>Changed invalid regex error message.</li>
<li>Corrected language errors &mdash; replaced <i>recieve</i> with <i>receive</i>.</li>
</ul> </ul>
<br/> <br/>
<a href="/tests.html">Tests</a><br/> <a href="/tests.html">Tests</a><br/>

View file

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>SVR.JS 3.11.0 Licenses</title> <title>SVR.JS 3.12.0 Licenses</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<style> <style>
@ -12,8 +12,8 @@
</style> </style>
</head> </head>
<body> <body>
<h1>SVR.JS 3.11.0 Licenses</h1> <h1>SVR.JS 3.12.0 Licenses</h1>
<h2>SVR.JS 3.11.0</h2> <h2>SVR.JS 3.12.0</h2>
<div style="display: inline-block; text-align: left; border-width: 2px; border-style: solid; border-color: gray; padding: 8px;"> <div style="display: inline-block; text-align: left; border-width: 2px; border-style: solid; border-color: gray; padding: 8px;">
MIT License<br/> MIT License<br/>
<br/> <br/>
@ -37,7 +37,7 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE<br/> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE<br/>
SOFTWARE.<br/> SOFTWARE.<br/>
</div> </div>
<h2>Packages used by SVR.JS 3.11.0 and utilities</h2> <h2>Packages used by SVR.JS 3.12.0</h2>
<div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;"> <div style="width: 100%; background-color: #ccc; border: 1px solid green; text-align: left; margin: 10px 0;">
<div style="float: right;">License: MIT</div> <div style="float: right;">License: MIT</div>
<div style="font-size: 20px;"> <div style="font-size: 20px;">

618
svr.js

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>SVR.JS 3.11.0 Tests</title> <title>SVR.JS 3.12.0 Tests</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<style> <style>
@ -12,11 +12,11 @@
</style> </style>
</head> </head>
<body> <body>
<h1>SVR.JS 3.11.0 Tests</h1> <h1>SVR.JS 3.12.0 Tests</h1>
<h2>Directory</h2> <h2>Directory (without trailing slash)</h2>
<iframe src="/testdir" width="50%" height="300px"></iframe> <iframe src="/testdir" width="50%" height="300px"></iframe>
<h2>Directory (with query)</h2> <h2>Directory (with query)</h2>
<iframe src="/testdir?query=value" width="50%" height="300px"></iframe> <iframe src="/testdir/?query=value" width="50%" height="300px"></iframe>
<h2>Directory (personalized)</h2> <h2>Directory (personalized)</h2>
<iframe src="/testdir/.personalized" width="50%" height="300px"></iframe> <iframe src="/testdir/.personalized" width="50%" height="300px"></iframe>
<h2>404 Error</h2> <h2>404 Error</h2>