Commit Graph

1666 Commits

Author SHA1 Message Date
Bobby Wibowo
25f87b3a49
chore: albumsController.js 2022-07-22 01:44:53 +07:00
Bobby Wibowo
7b9fca0bc3
refactor: req.params -> .path_parameters
direct hyper-express prop get
2022-07-22 01:44:15 +07:00
Bobby Wibowo
9a3c81b8bd
fix: api.js 2022-07-22 01:20:08 +07:00
Bobby Wibowo
fc1783fa12
chore: lolisafe.js 2022-07-22 01:12:41 +07:00
Bobby Wibowo
76a73b7e83
refactor: ServeStatic.middleware -> .handler
also moved it from middlewares to handlers directory

reasoning is that this class is better suited to handle routes directly
instead of being a global middleware
since IO stat to check if request path matches a physical file in the
disk every single time is not very performant
2022-07-22 01:12:35 +07:00
Bobby Wibowo
06178cc2c4
chore: lolisafe.js 2022-07-22 01:09:34 +07:00
Bobby Wibowo
30e9227a78
feat: custom pages use ServeLiveDirectory
they now have conditional GET suppor too
2022-07-22 01:09:17 +07:00
Bobby Wibowo
51e12e13c0
refactor: rateLimiter.js 2022-07-22 00:57:57 +07:00
Bobby Wibowo
d6020d81ae
feat: serveStatic with accept-ranges support
for streaming support

and with conditional GET support
2022-07-22 00:01:25 +07:00
Bobby Wibowo
33d0428e74
refactor: unset pattern in / middlewares
not having it set equals to having it be on / pattern to begin with
2022-07-21 23:59:46 +07:00
Bobby Wibowo
61461d2c26
feat(deps): added etag, fresh, and range-parser
aside from fresh, the other 2 are already dependencies of hyper-express,
so it barely increased production dependencies size

i suspect fresh will also be used by it anyways, since it's a pretty
generic library to handle conditional GET requests
2022-07-21 23:58:47 +07:00
Bobby Wibowo
d9fd98f7de
feat: improved serveLiveDirectory
allow disabling etag and lastModified headers if required
2022-07-21 23:56:57 +07:00
Bobby Wibowo
1b4b73b67c
feat: improved errorsController.js
mainly handling generic errors
2022-07-21 23:56:08 +07:00
Bobby Wibowo
c0e91e205c
chore: rateLimiter.js 2022-07-21 23:55:48 +07:00
Bobby Wibowo
97bd8f9e5a
chore: serveLiveDirectory.js 2022-07-21 21:14:56 +07:00
Bobby Wibowo
e7a15ecc47
feat: custom livedirectory middleware
with conditional gets support
2022-07-21 21:13:46 +07:00
Bobby Wibowo
ad22285661
refactor: res.set -> res.header
res.set() is an expressjs-compat function with unnecessary checks for
our use case
2022-07-21 20:28:10 +07:00
Bobby
05448842b8
feat(deps): update hyper-express to ~6.4.1 2022-07-20 04:42:40 +07:00
Bobby
e574cb4498
chore: merge branch 'safe.fiery.me' into safe.fiery.me-feat/hyper-express 2022-07-16 03:27:05 +07:00
BobbyWibowo
3b2174b018 dist: rebuilt client assets and bumped v1 version string 2022-07-15 20:03:40 +00:00
Bobby
2e5a2edf70
fix: align scss with standard-scss@5 2022-07-16 03:02:36 +07:00
Bobby
40b00ea95f
chore(deps): systeminformation 2022-07-16 03:02:14 +07:00
renovate[bot]
6dac68767c
fix(deps): update dependency systeminformation to v5.12.1 (#537)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-16 02:11:24 +07:00
renovate[bot]
4469ef50ab
chore(deps): update dependency stylelint-config-standard-scss to v5 (#538)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-16 02:08:49 +07:00
renovate[bot]
6c1500e5dc
chore(deps): update dependency browserslist to ~4.21.2 (#535)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-16 02:07:29 +07:00
renovate[bot]
3409a0ccab
fix(deps): update dependency better-sqlite3 to ~7.6.1 (#536)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-07-16 02:07:18 +07:00
Bobby
e6753ab15d
fix: handle connection drop on multiform upload 2022-07-15 01:40:57 +07:00
Bobby
27f3bc3119
perf: don't wrap multipart handler in try-catch
fixed in https://github.com/kartikk221/hyper-express/releases/tag/6.3.0
2022-07-15 01:06:28 +07:00
Bobby
bdbd78bad1
fix(deps): update hyper-express to ~6.3.0 2022-07-15 00:29:54 +07:00
Bobby Wibowo
6e83e92c4b
feat: disable proxy buffers in docker nginx config 2022-07-14 20:46:09 +07:00
Bobby Wibowo
f0856239c3
feat: warn when deprecated rateLimits is in config 2022-07-14 18:34:50 +07:00
Bobby Wibowo
f40c9e0287
chore: serveStatic.js 2022-07-14 18:34:25 +07:00
Bobby Wibowo
7f6c29b136
fix: properly clean rejected empty files
should also now properly clean temp files from other unexpected errors
2022-07-14 18:18:39 +07:00
Bobby Wibowo
5ee82ce680
perf: don't wait for unlink promise in fail upload
just let it run in the background and respond to client immediately
2022-07-14 18:17:46 +07:00
Bobby Wibowo
7710e63d70
fix: prevent hashStream.update() after .dispose() 2022-07-14 17:01:59 +07:00
Bobby Wibowo
9372c5bada
chore: views/faq.njk 2022-07-14 16:39:07 +07:00
Bobby Wibowo
29b16edc04
perf: improve uploads flow
lessen temporary objects/variables creation,
and refactor some variable names to be more obvious
2022-07-14 16:35:06 +07:00
Bobby Wibowo
ac63f8b76d
perf: no try-catch block on cloudflare cache purge 2022-07-14 14:41:55 +07:00
Bobby Wibowo
edbb6ef9f0
fix(deps): update hyper-express to ~6.2.6 2022-07-14 14:13:42 +07:00
Bobby Wibowo
c32f18a697
fix: uploads mimetype not properly set 2022-07-12 15:26:53 +07:00
Bobby Wibowo
61904ee1a7
chore: comment for pages option in config 2022-07-12 14:53:14 +07:00
Bobby Wibowo
e82cf714dd
fix: cache-control broken with cloudflare setting 2022-07-12 14:52:46 +07:00
Bobby Wibowo
0f6409132a
feat: busboy limits and multipart errors handler
unfortunately to capture multipart errors, we have to wrap the entire
callback function with try-catch block

but it appears overall processing is still slightly faster than
expressjs + multer
2022-07-12 14:39:16 +07:00
Bobby Wibowo
68b230702e
chore(deps): rebuild yarn.lock 2022-07-12 13:39:40 +07:00
Bobby Wibowo
7f9d05da26
feat: multer -> hyper-express multipartfield
get outta here multer, lmao
2022-07-12 13:07:13 +07:00
Bobby Wibowo
8f3d6b1557
fix: album pages cache 2022-07-12 10:42:14 +07:00
Bobby Wibowo
e9736f436c
feat: have res.render return the compiled html 2022-07-12 10:41:58 +07:00
Bobby Wibowo
8f2a8400ea
chore: bump minimum node version to 14+ 2022-07-12 10:32:09 +07:00
Bobby Wibowo
80d59ff2f0
feat: front-end pages middleware
custom pages may now override any built-in pages on the fly as lolisafe
is running

also added internal persistent cache feature into NunjucksRenderer
front-end pages will now be persistently cached during production
2022-07-12 10:31:59 +07:00
Bobby Wibowo
9852dec3d1
chore: RateLimiter clean ups 2022-07-12 10:30:36 +07:00