Commit Graph

611 Commits

Author SHA1 Message Date
01c6544e22 Move server-main to /src 2025-04-23 20:50:46 +03:00
26a520af10 Support specifing config.yaml in cli 2025-04-23 11:18:30 +08:00
bf97686dfc Allow read-only installation
Fix #3453.

Thanks to #3499, #3500 and #3521, most of the obstacles to read-only installation have been resolved. This PR addresses the final piece, ensuring that SillyTavern no longer changes directories to `serverDirectory` and outputs files there. Instead, it outputs or copies necessary files to the directory where it is being run. Now, `serverDirectory` is read-only for SillyTavern (i.e., SillyTavern will not attempt to modify `serverDirectory`). Additionally, this PR sets the permissions for copied `default-user` files to be writable, so even if SillyTavern is installed as read-only, the copied `default-user` folder can still be modified.
2025-04-16 09:52:08 +08:00
058fef1146 Update Jimp and add WASM plugins (#3784)
* Update jimp, use WASM format plugins

* Fix Jimp import path in thumbnails endpoint

* Fix size variable

* Add fetch patch to handle file URLs

* Fix JPEG thumbnailing

* Enhance fetch patch to validate file paths and support specific extensions

* Add default msBmp format

* Update jsconfig

* Update JPEG color space in thumbnail generation to YCbCr

* Install jimp plugins explicitly

* Refactor fetch patch utility functions
2025-04-01 21:55:21 +03:00
3458f58c63 Refactor ensureThumbnailCache to accept directoriesList parameter 2025-04-01 11:16:00 +03:00
75be96e1f7 Merge pull request #3754 from SillyTavern/fix-openrouter-oauth
OpenRouter: Fix OAuth flow with enabled accounts
2025-03-25 23:20:42 +02:00
4ced7abaa3 OpenRouter: Fix OAuth flow with enabled accounts 2025-03-24 20:22:59 +02:00
c2e6593343 Add error handling to autorun 2025-03-24 10:03:23 +00:00
4490c3edd5 Dispose diskCache during preSetupTasks cleanup 2025-03-20 10:24:27 +02:00
3355c682ca Convert to class 2025-03-20 10:21:41 +02:00
9c7d3d7400 Add cache validation func to startup 2025-03-19 23:03:39 +02:00
67d013e40a Use default middleware for parsing request body 2025-03-10 00:48:58 +02:00
6b821409e0 Add server events emitter 2025-03-06 14:55:50 +00:00
4c242fefe8 More concise startup logs 2025-03-01 21:07:12 +02:00
978b2cdb21 Refactor whitelist middleware to return a promise and update server.js to handle async initialization 2025-02-28 00:25:59 +02:00
60448f4ce8 Move security checks to users.js 2025-02-27 21:27:39 +02:00
a20928b02c Fix class method bind. Await open promise 2025-02-26 20:19:32 +02:00
b64273ab94 Fix comments, update function interfaces 2025-02-26 15:36:01 +00:00
e7fcd0072b Refactor server startup 2025-02-26 14:46:54 +00:00
a73dfa7586 Merge branch 'staging' into immutable-config 2025-02-22 20:15:13 +02:00
3e26b93971 Do not register whitelist middleware if whitelist disabled 2025-02-22 14:14:40 +02:00
b12cd9fe05 Merge branch 'staging' into feature/access-log-middleware 2025-02-22 13:49:36 +02:00
d32adb8d1d Fix requestProxyBypass command line default value
Closes #3528
2025-02-21 23:07:33 +02:00
f755c3d4cb refactor(middleware): rename accessLogger to accessLogWriter 2025-02-21 23:56:31 +08:00
9c3e8c935b refactor(Middleware): only mount accessLogger when listen is enabled 2025-02-21 23:49:15 +08:00
bfc609c2a8 fix(middleware): skip New connection message and access.log writes for localhost 2025-02-21 22:17:12 +08:00
db500188d8 feat(middleware): add separate access log middleware with config option 2025-02-21 20:32:23 +08:00
00bb36f764 Fix setting basic auth creds with env 2025-02-20 22:38:47 +02:00
2b28065c9f Fix setting protocols with env 2025-02-20 22:28:30 +02:00
3f03936125 Add config value type converters for numbers and booleans 2025-02-20 21:53:48 +02:00
f6fe5fea77 Allow overriding config.yaml values with env vars
Closes #3520
2025-02-20 20:29:42 +02:00
7ea2c5f8cf Move cookie secret to data root. Make config.yaml immutable 2025-02-20 20:16:44 +02:00
3d8a897c19 Auto-extend session cookie every 30 minutes 2025-02-19 23:42:28 +02:00
da3b620f74 Move access.log to data root 2025-02-17 22:58:06 +02:00
bae02a44ed Add cache buster middleware to clear browser cache on server restart 2025-02-15 12:56:43 +02:00
dbbf069e85 Remove message redundancy 2025-02-14 23:53:31 +02:00
c98d241f3c Refactor logAddress check 2025-02-14 23:09:36 +02:00
961a71877b Remove extra resolve for autorun 2025-02-14 22:02:16 +01:00
f5bfbce0ad Group listenAddress for config 2025-02-14 20:04:23 +01:00
a4c124dff0 Remove dead code 2025-02-14 20:00:15 +01:00
2445b6d9dc Split up listen address configuration between IPv4 and IPv6 2025-02-14 19:58:59 +01:00
ad8f0f564f Use IP Regex package, update default 2025-02-14 19:06:07 +01:00
dd55b2770a Address issues with IPv6 binding 2025-02-13 23:51:18 +01:00
83f74a5d22 Allow user to configure an address to listen to 2025-02-13 23:43:10 +01:00
5f564343ec Remove console log 2025-02-04 23:14:01 +02:00
dfb062af41 Clean-uo blank lines 2025-02-04 22:52:07 +02:00
d9bb5e6b1f Revert old default values 2025-02-04 22:46:24 +02:00
363d8a4121 Merge branch 'staging' into ipv6_auto 2025-02-04 22:45:46 +02:00
552a418bae Merge branch 'staging' into staging-3071-v2 2025-01-28 10:49:53 -05:00
c9a1a3eb94 Merge pull request #3351 from SillyTavern/csrf-sync
Replace CSRF middleware
2025-01-25 23:23:43 +02:00