Thomas Lynch
612e7d0f3a
Add language set middleware to a bunch of routes, and make some minor middleware ordering changes to supprot
...
Add example translations in server.js, a controller for form submission, and in a middleware (file middleware in this case)
2 years ago
Thomas Lynch
a019006e20
For the 100th time, make it "work"
2 years ago
Thomas Lynch
670119148c
Make languages on frontend included individually as a language .js file. Fix issue with lib/build/render.js page. I **think** this is good now.
2 years ago
Thomas Lynch
5bf792649b
Try getting languages into the frontend (still want a better way to only include single language packs and only a subset of keys)
2 years ago
Thomas Lynch
224b141920
Change setting locale in render locals in build locals, remove test header
2 years ago
Thomas Lynch
4c3ba53cc1
Set language global and after boards.exists
2 years ago
Thomas Lynch
eb8ba712f6
Add __ local to app locals
2 years ago
Thomas Lynch
679d095d98
Start on localisation ref #396
2 years ago
Thomas Lynch
5a7368a0a4
Add a new property to permissions metadata and reflect on frontend inability for users without that "parent" permission to edit roles/accounts to have some permissions e.g. root, edit roles, edit accs
...
Put the metadata into permissions.js (also TODO: key the metadata by bits instead? i.e [Permisions.whatever]: {})
2 years ago
Thomas Lynch
c8ebf9a579
Improvement to grid v1 to allow customising, allowing for something like this.
...
-true characters
-false characters
-question text
Make optional (and add additional options for) some filters/effects
-paint
-line
-wave
2 years ago
Thomas Lynch
bc6027dbec
Fix eslint no-unused-vars breaking express.use for error handler (needs 4 arguments in functio nsignature)
2 years ago
Thomas Lynch
e047782249
eslint lib, migrations, db, models, test, schedules and root dir
2 years ago
Thomas Lynch
bb582c2de8
"helpers" -> "lib
...
god help anybody who gets serious merge conflicts from this
close #434
2 years ago
Thomas Lynch
cce0bc661d
experimental, and the goal is for running tests, not deployment (for now)
...
some TODO's still:
- make the jschan dockerfile not just COPY everything, make it have better stages and caching
- maybe run gulp in the CMD instead of in the build only?
- bring all the jschan files into another volume
- custom nginx container (self-signed ssl, geoip database)
- passwords for db/redis. should be easy with the official dockers, just a few env vars
not an exhaustive list
2 years ago
Thomas Lynch
00da66f95e
dont destructure roles, access it normally so load() callback will update them properly
...
and rename agian, why do i suck at naming stuff lol
3 years ago
Thomas Lynch
e511c67efa
Make roles update on edits and fix map imports, so the role names show correctly after edt
3 years ago
Thomas Lynch
993924a5f2
Start making roles editable ref #377
...
permtemplates are now roles.
They are in the db and can be edited.
Still have to do a few things like the migration, gulpfile and some small details.
3 years ago
Thomas Lynch
8bd41eabd0
ref #377 "template names", else "Custom" in accounts/staff table
3 years ago
Thomas Lynch
d1f9c78258
ref #377 , the fun begins
...
still a few things to do, see TODO (heh)
mostly working how i imagined, with a few quirks.
pretty happy with it.
3 years ago
Thomas Lynch
fb6c0fa52f
custom links for archive/reverse, close #373
3 years ago
Thomas Lynch
f606cd186a
change permission setting from number to dropdown with names, thanks some_random_guy
...
and some related css tweak and faq page update
3 years ago
Thomas Lynch
0c0102ec0c
make referer check work again
4 years ago
Thomas Lynch
8892f64bad
merge webring db,
...
improve board list sorting and filters
improvelayout of public and global manage board list forms
and add extra homepage stat
4 years ago
Thomas Lynch
daf89c5548
||
4 years ago
Thomas Lynch
9be5fbc462
add some locals to server app.locals that were only included in the render helper
4 years ago
Thomas Lynch
1c5f14e419
This did not go as planned
4 years ago
Thomas Lynch
60cddef23a
slowly switch configs to db and only a small amount of things like secrets remain in a config file
4 years ago
Thomas Lynch
9ad03e096a
make subscriber only start when there is any listener so its not needed in gulptasks for example
...
change how to close redis since there are more than 1 connection for other thigns
4 years ago
Thomas Lynch
e9ca4d7e21
reload app locals on config change
4 years ago
Thomas Lynch
de75523ddc
start making the config able to reload, for now just clearing require.cache
...
also made some of the app.locals load from getconfig, not added to callbacks in redis yet
4 years ago
dolphin
d51aa143a8
Add in hcaptcha support.
4 years ago
Thomas Lynch
ba4ea5834e
Better error handler, and catch some more errors from body parser for urlencoded forms
4 years ago
Thomas Lynch
5274abb8ba
add formatsize helper to server
4 years ago
Thomas Lynch
080dc3f660
Bugfix not showing post file size on express server .render('d pages
4 years ago
Thomas Lynch
646cc551b7
More configuration and bit less ugly config layout for captcha
4 years ago
Thomas Lynch
60d36bbb6a
Make a bit more maintainable, support different captcha types with some config options
4 years ago
Thomas Lynch
09e0bcb518
references #209 , add optional google recaptcha. implementation could use some polish, but it will work for now.
4 years ago
Thomas Lynch
b0797f0418
Beta testing .onion support
...
***DO NOT USE***
This still has some issues and needs testing.
- needs updated nginx configs added, expects "TOR" in the x-country-code header under a separate vhost
- need to make sure bans work properly still
- need to implement system to prevent captcha ddos, since i cant just to IP ratelimit now
- im 99% sure post history of tor users is broken if viewed by non-global staff
- manual input ban form will also be broken for non-global staff
- could still use some improvement on the middleware having a little more complicated flor for tor users
But for the most part it works. Basically it will use the bypass id of a tor user as their "ip".
4 years ago
some_random_guy
0f20646833
use `redirect: false` in express.static
...
This prevents prolems like `/` giving 404 in devel mode (when
`static/html/index.html` is missing) or `/captcha` redirecting to
`/captcha/` (then breaking).
4 years ago
some random guy
cfc97b8101
do not read session when not needed
4 years ago
Thomas Lynch
39bbedfe53
Get session in websocket
4 years ago
fatchan
9f9d8387f9
Exit if migrateVersion outdated close #163
4 years ago
fatchan
84b9bdb578
Dont show webring link in navbar if disabled reference #145
4 years ago
fatchan
dfc453ef81
fixes #137 , not even a regression. i dont think that ever worked
4 years ago
fatchan
3bda3aa596
only use processip middleware where necessary references #121
4 years ago
fatchan
ab7ac2558a
add short commit hash as v?= query of important scripts and css for updates, to cache bust on updates for public site
4 years ago
fatchan
e814b1904f
better graceful server shutdown
4 years ago
fatchan
a9d08b1c28
early ver of per-board recents and changed iphash code
5 years ago
fatchan
5be8431d24
supporting stuff for modals, scripts, and urlencoded handling in forms.js
5 years ago
fatchan
73203db312
start option for unhashed ips
5 years ago