1
0
Fork 0
forked from svrjs/svrjs
Commit graph

63 commits

Author SHA1 Message Date
c2eed2870d style: style the code according to new Prettier rules 2024-09-01 21:54:42 +02:00
0450094c68 Add tests for middleware, add ".js" file extensions inside the require functions in tests for utility functions, make error handling in URL rewriting middleware better, and lint out static file serving and directory listing middleware 2024-08-30 22:11:16 +02:00
1444660d19 Fix "NaN" file sizes in directory listings 2024-08-30 06:39:06 +02:00
9f51366515 Simplify ES6-style functions 2024-08-29 19:27:04 +02:00
979a30e938 Replace var's with let's and const's 2024-08-29 19:15:07 +02:00
3b4fd9641c Change blocklist-related commands to use .forEach() function instead of a for loop 2024-08-29 19:05:02 +02:00
486820e1da Converted one more string to template string 2024-08-28 07:35:27 +02:00
30498263fc Convert a "bytes */" + filelen string to a template string 2024-08-27 21:39:51 +02:00
8589f0a6e4 Changed URL parser from WHATWG to custom one and adapted code accordingly 2024-08-27 18:03:47 +02:00
fae1b661ed Fix or ignore all ESLint errors 2024-08-27 11:28:24 +02:00
fd5e8ba70e Lint out the codebase 2024-08-27 10:55:24 +02:00
5a3e6765f1 Replace ES5-style functions with ES6-style ones 2024-08-27 10:54:08 +02:00
6f6fb1f89f Fix 500 Internal Server Error related to URL rewriting 2024-08-27 09:42:06 +02:00
2f783ce1a2 Lint out the codebase 2024-08-26 19:23:52 +02:00
488bee1a95 Replace some strings with template strings 2024-08-26 19:21:52 +02:00
d92fc14991 Remove listenerEmitted flag from HTTP authentication message callback 2024-08-26 17:13:48 +02:00
5672c4a3d5 Fix static file served with wrong MIME type 2024-08-26 13:48:58 +02:00
f074612dda Replace one more "SVR.JS" with reference to svrjs.json file 2024-08-26 09:31:50 +02:00
2e9b0ed1c5 Move default SVR.JS-generate page CSS to the separate file 2024-08-26 09:30:52 +02:00
914b38e0b0 Fix 500 Internal Server Error related to HTTP authentication 2024-08-26 07:57:07 +02:00
57bb2293b9 Fix "block" and "unblock" commands 2024-08-26 06:32:54 +02:00
58cb60fb8f Change the way of adding process message listeners, and add process message listener to server error handler. 2024-08-25 17:57:23 +02:00
7decde6b58 Lint out the codebase 2024-08-25 13:10:28 +02:00
fcec27fee1 Replace "SVR.JS" with references to svrjs.json file 2024-08-25 13:09:58 +02:00
04ab80cc95 Lint out the codebase 2024-08-25 12:56:36 +02:00
4b02efdeba Add proxySafe flag to middleware. 2024-08-25 12:37:14 +02:00
fb7c5ed854 Move core middleware to the request handler. 2024-08-25 12:33:11 +02:00
0085ff740d Change reqerrhandler placeholder to emitting clientError event on the server. 2024-08-25 10:57:37 +02:00
0ceded2256 Add static file serving and directory listing functionality. 2024-08-25 10:23:37 +02:00
b5ad179097 Replace "SVR.JS" in status page with reference to svrjs.json 2024-08-25 09:47:36 +02:00
695816b9d0 Lint out the codebase. 2024-08-25 09:45:42 +02:00
55d5efe54f Add default handler checks, server status page, sizify() utility function, and move counters from core.js middleware to index.js. 2024-08-25 09:44:53 +02:00
8a54834276 Lint out the codebase. 2024-08-25 09:25:06 +02:00
5d463c9f11 Fix a 500 HTTP error code related to URL rewriting functionality. 2024-08-25 09:14:38 +02:00
89e9b35829 Add ipBlockList utility function, blocklist functionality, and read from config.json functionality. 2024-08-25 09:12:39 +02:00
5fab894caf Move parts of middleware that checks for forbidden paths to separate utils file, and add tests for them. 2024-08-25 07:13:41 +02:00
e94391f197 Lint out the codebase. 2024-08-24 20:45:17 +02:00
2075d41ab3 Fix URL sanitiation and rewriting-related functions removing query strings and hashes. 2024-08-24 20:44:43 +02:00
3613aa92d2 Add trailing slash redirection middleware. 2024-08-24 20:40:28 +02:00
c1900ee128 Add non-standard codes and HTTP authentication middleware, and SHA256 utility function. 2024-08-24 20:32:06 +02:00
11e7247869 Replace __dirname with process.dirname (declared as __dirname in index.js) 2024-08-24 19:29:12 +02:00
24b161b0ed Replace var's with const's in the middleware that checks for forbidden paths. 2024-08-24 17:48:55 +02:00
519988fbdb Lint out the codebase. 2024-08-24 17:46:55 +02:00
67fec5fe98 Add middleware that checks for forbidden paths. Also add some more placeholder config.json variables. 2024-08-24 17:44:25 +02:00
d688166022 Add middleware responsible for setting response headers (res.setHeader function). 2024-08-24 17:32:27 +02:00
f552b34878 Lint out the codebase. 2024-08-24 17:23:06 +02:00
f48125f4f2 Move matchHostname function to separate source file, and add unit tests for the function. 2024-08-24 17:21:09 +02:00
519e68465a Add SVR.JS name and documentation URL to svrjs.json file. 2024-08-24 17:13:59 +02:00
1161256ab9 Create config.generateServerString() function and src/utils/generateServerString.js file. 2024-08-24 17:06:34 +02:00
a3e4ee2328 Replace some var's with const's in URL rewrite and web root postfix middleware. 2024-08-24 08:24:39 +02:00