| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
References: https://todo.sr.ht/~runxiyu/cca/13
|
|
|
|
| |
Implements: https://todo.sr.ht/~runxiyu/cca/3
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This reverts commit a25fdc67f05cfb1b37ac750460a21ddbb18008de.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
- Remove sub-Makefiles; recursive make is annoying
- Just use one top-level Makefile that builds everything
- Embed templates and minified static resources into the binary
- Embed all compiled documentation into the binary and serve
- Embed all source into the binary and serve
|
|
|
|
| |
And adjust Makefiles, admin handbook, and lint.sh accordingly.
|
|
|
|
| |
Implements: https://todo.sr.ht/~runxiyu/cca/5
|
| |
|
|
|
|
|
|
| |
It is possible to use var chanPool = make(map[string](*chan string))
directly during declaration, even if it's a global variable. There is
no need to call a function to initialize it.
|
|
|
|
|
|
|
|
|
| |
Because of the poor performance of using NGINX as a reverse proxy, I've
added native TLS in commit 4a1a7af76408e956ebc343bf28960fdd00c00c58.
Serving static files was already supported, but it was expected that
people use a static web server to do so, so we didn't support
a configurable static path. Now since reverse proxy setups are
discouraged, it makes more sense to be better at serving static files.
|
| |
|
|
|
|
|
|
| |
I would love to serve FastCGI but it is a huge pain to get WebSocket
working, at least with NGINX. I don't think OpenBSD httpd would be
better at this either.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When beginning to handle a WebSocket connection, we shall create a new
context, with the request context as its parent. We use the new context
for everything from now on, except for reporting error messages, which
is handled by creating a reportError function in a closure in
makeReportError and passing it along to command-handling functions.
Note that if one user attempts to rapidly launch WebSocket connections,
there might still be a race condition where the old connection hasn't
been completely established yet (i.e. an entry hasn't been added to
cancelPool) and the new connection isn't able to cancel the old
connection. I'm a bit tired to think of a solution now but it could
probably be solved by moving the cancellation registration and
cancelling sooner during the initial handshake.
Note that more parts of the event loop needs to select from ctx.Done
(from newCtx) for this to work reliably.
|
|
|
|
|
|
|
|
|
|
| |
I don't think password authentication is really useful, since
Microsoft Entra ID is the "proper" way of doing authentication in our
school system and there's just little reason to have a password login.
I previously wanted to use password authentication for stress testing,
but stress testing really could just use completely fake authentication
and there's no need for any password whatsoever.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This reverts commit 65d3c85e3bee4b5961e53338f8b42e5a68ff1b04.
I'm reverting this for now because it seems to make requests hang
indefinitely.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
These are imported from FBFP and slightly modified to be specific to YKPS
(while not being hard to port to other environments that use APIs that use
OAUTH 2.0). Some code is also simplified.
Database code still needs an audit, and things are not tested yet.
|