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,
"pubport": 80,
"page404": "404.html",
"timestamp": 1692493855777,
"timestamp": 1701600932028,
"blacklist": [],
"nonStandardCodes": [],
"enableCompression": true,
@ -89,14 +89,22 @@
"dontCompress": [
"/.*\\.ipxe$/",
"/.*\\.img$/",
"/.*\\.iso$/"
"/.*\\.iso$/",
"/.*\\.png$/",
"/.*\\.jpg$/",
"/.*\\.webp$/"
],
"enableIPSpoofing": false,
"enableIPSpoofing": true,
"secure": false,
"sni": {},
"disableNonEncryptedServer": false,
"disableToHTTPSRedirect": false,
"enableETag": true,
"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;"pubport": 80,<br/>
&nbsp;&nbsp;"page404": "404.html",<br/>
&nbsp;&nbsp;"timestamp": 1680954429282,<br/>
&nbsp;&nbsp;"timestamp": 1701600932028,<br/>
&nbsp;&nbsp;"blacklist": [],<br/>
&nbsp;&nbsp;"nonStandardCodes": [],<br/>
&nbsp;&nbsp;"enableCompression": true,<br/>
@ -40,6 +40,7 @@
&nbsp;&nbsp;"exposeServerVersion": true,<br/>
&nbsp;&nbsp;"disableServerSideScriptExpose": true,<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;"replacements": [<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;}<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;"dontCompress": ["/.*\\.ipxe$/","/.*\\.img$/","/.*\\.iso$/"],<br/>
&nbsp;&nbsp;"enableIPSpoofing": false,<br/>
&nbsp;&nbsp;"dontCompress": [<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;"sni": {},<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>
</div>
<p>Changes:</p>
<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>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>Fixed language errors in HTTP error code descriptions, error console messages and the index page.</li>
<li>Updated the logo in the SVR.JS log viewer.</li>
<li>Added trailing slash redirect support.</li>
<li>Added new <i>config.json</i> property &mdash; <i>environmentVariables</i>.</li>
<li>Replaces base 1000 size prefixes with base 1024 ones.</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>
<br/>
<a href="/tests.html">Tests</a><br/>

View file

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<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 charset="UTF-8" />
<style>
@ -12,8 +12,8 @@
</style>
</head>
<body>
<h1>SVR.JS 3.11.0 Licenses</h1>
<h2>SVR.JS 3.11.0</h2>
<h1>SVR.JS 3.12.0 Licenses</h1>
<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;">
MIT License<br/>
<br/>
@ -37,7 +37,7 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE<br/>
SOFTWARE.<br/>
</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="float: right;">License: MIT</div>
<div style="font-size: 20px;">

508
svr.js

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<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 charset="UTF-8" />
<style>
@ -12,11 +12,11 @@
</style>
</head>
<body>
<h1>SVR.JS 3.11.0 Tests</h1>
<h2>Directory</h2>
<h1>SVR.JS 3.12.0 Tests</h1>
<h2>Directory (without trailing slash)</h2>
<iframe src="/testdir" width="50%" height="300px"></iframe>
<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>
<iframe src="/testdir/.personalized" width="50%" height="300px"></iframe>
<h2>404 Error</h2>