Commit graph

23 commits

Author SHA1 Message Date
Richard Hansen
649fbdccf5 express: Move static handlers to expressPreSession
This avoids the need to exempt the paths from authentication checks,
and it eliminates unnecessary express-session state.
2021-12-20 20:08:19 -05:00
Richard Hansen
7f3d0e71f7 express: Check access before expressConfigure middleware
There are no guarantees about the order of execution of hook
functions, which means that a plugin's `expressConfigure` hook
function could theoretically register a handler/middleware before the
access check middleware is registered. If that happens, the plugin's
handler would run before the access check, which would be bad. Avoid
the problem by explicitly installing the `webaccess.checkAccess`
middleware before running the `expressConfigure` hook.
2021-12-20 20:08:18 -05:00
webzwo0i
58bd96ce8f padreadonly: Remove dead /ro/:id handling
Read-only pads are accessed using `/p/` path since commit
ba3430ebb7.
2021-09-14 17:07:55 -04:00
Richard Hansen
00d45e3229 Defer rate limiter creation to a hook call
This makes it possible to change the rate limiter settings via
`/admin/settings` or by modifying the appropriate settings object and
reinvoking the hook.
2021-02-16 21:13:35 -05:00
Richard Hansen
f31232dd20 socket.io: Disconnect clients when closing HTTP server 2020-12-23 16:18:28 -05:00
Richard Hansen
7949219179 Reformat src/ep.json 2020-12-23 16:18:28 -05:00
Richard Hansen
a000a93dc6 Refactor startup/shutdown for tests
* `src/node/server.js` can now be run as a script (for normal
    operation) or imported as a module (for tests).
  * Move shutdown actions to `src/node/server.js` to be close to the
    startup actions.
  * Put startup and shutdown in functions so that tests can call them.
  * Use `await` instead of callbacks.
  * Block until the HTTP server is listening to avoid races during
    test startup.
  * Add a new `shutdown` hook.
  * Use the `shutdown` hook to:
      * close the HTTP server
      * call `end()` on the stats collection to cancel its timers
      * call `terminate()` on the Threads.Pool to stop the workers
  * Exit with exit code 0 (instead of 1) on SIGTERM.
  * Export the HTTP server so that tests can get the HTTP server's
    port via `server.address().port` when `settings.port` is 0.
2020-09-22 11:07:21 +01:00
Viljami Kuosmanen
25e081ac89 openapi: implement API handler with openapi-backend
- Tests pass 
- Added openapi-backend hook
- Generating OpenAPI v3 definitions for each API version
- Definitions served /api/openapi.json /api/{version}/openapi.json
2020-04-03 01:03:11 +02:00
Nelson Silva
1cfc8eda19 Initial work on swagger 2013-03-06 10:10:21 +00:00
Peter 'Pita' Martischka
6de7634357 merged develop back in 2012-11-13 07:43:48 -08:00
Peter 'Pita' Martischka
4c095202bd Merged branch feature/frontend-tests 2012-11-13 07:29:57 -08:00
Marcel Klehr
a3504f70c4 Add i18n component 2012-11-10 14:12:17 +01:00
John McLear
b6a331b9ec Merge pull request #1120 from Pita/feature/settings-admin
Modify Server Settings in /admin/settings
2012-11-05 04:48:59 -08:00
Peter 'Pita' Martischka
6408581adb merged develop back in 2012-11-03 18:16:36 +00:00
johnyma22
89e38ed4c2 Start putting file system together for admin settings, no where near complete 2012-11-02 13:16:15 +00:00
Marcel Klehr
2d6e577683 Put up some '/admin doesn't exist' notice. 2012-11-01 19:45:26 +01:00
Peter 'Pita' Martischka
ba4ebbba3b Setted up an enviroment for frontend tests, first steps 2012-10-02 00:35:43 +01:00
Egil Moeller
b438a278a1 Make the server restart on plugin install 2012-07-03 23:31:44 +02:00
Egil Moeller
81250cba15 Searching for plugins, plus handling async events from the server (progress) 2012-03-15 21:07:48 +01:00
Egil Moeller
51cae02e9d Show installed plugins and search new ones 2012-03-15 18:25:06 +01:00
Chad Weider
ee312672d3 This is duplicated by the contents of static. 2012-03-10 14:39:37 -08:00
Egil Moeller
81440cd856 Removed old pluginfw stuff 2012-03-01 19:00:58 +01:00
Egil Moeller
da52353ba3 The big rename of pluginbs from pluginomatic to ep 2012-02-26 13:54:32 +01:00
Renamed from src/pluginomatic.json (Browse further)