Commit Graph

1678 Commits

Author SHA1 Message Date
Bobby
951737d7d0
feat: handle upload post api based on request type
it'd previously always try to parse as multipart first
now it'll immediately assume the upload post api is for url uploads if
the request type is json
2022-07-22 08:42:11 +07:00
Bobby
776ab8ab37
feat: assert request content-type in post apis 2022-07-22 08:40:40 +07:00
Bobby Wibowo
aa85d04d34
fix: url uploads failing 2022-07-22 04:20:37 +07:00
Bobby Wibowo
634347c219
chore: README.md, last time for the night I swear
my OCD..
2022-07-22 03:35:15 +07:00
Bobby Wibowo
cd39b4c1e5
chore: README.md 2022-07-22 03:33:13 +07:00
Bobby Wibowo
5b979c5139
chore: README.md 2022-07-22 03:26:27 +07:00
Bobby Wibowo
eb41aea5f2
feat: merge 'safe.fiery.me-feat/hyper-express' 2022-07-22 03:23:07 +07:00
BobbyWibowo
970d53c7dc dist: rebuilt client assets and bumped v1 version string 2022-07-21 20:18:56 +00:00
Bobby Wibowo
2a2d57a9e5
feat: list features in README.md 2022-07-22 03:10:32 +07:00
Bobby Wibowo
f76a7cf91c
chore: docker/README.md 2022-07-22 03:10:09 +07:00
Bobby Wibowo
96d276b396
fix: check if req.path_parameters is set 2022-07-22 02:03:59 +07:00
Bobby Wibowo
07d0237031
refactor: res.query -> .query_parameters
direct hyper-express prop get
2022-07-22 02:02:59 +07:00
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