Commit Graph

65 Commits

Author SHA1 Message Date
Rijk van Zanten
a3898fa321 Add SESSION_STORE options (#5403)
* Allow configuring the session storage driver

Fixes #3814

* Document SESSION_STORE env var

* Add missing dependency

* Docs tweak
2021-04-30 18:18:39 -04:00
rijkvanzanten
801e868554 Fix remaining eslint errors
h/t @paescuj
2021-04-29 15:55:12 -04:00
Pascal Jufer
acd41eb0be Syntax fixes (#5367)
* Declare return types on functions

And a very few other type related minor fixes

* Minor syntax fixes

* Remove unnecessary escape chars in regexes
* Remove unnecessary awaits
* Replace deprecated req.connection with req.socket
* Replace deprecated upload with uploadOne
* Remove unnecessary eslint-disable-next-line comments
* Comment empty functions / catch or finally clauses
* Fix irregular whitespaces
* Add missing returns (null)
* Remove unreachable code
* A few logical fixes
* Remove / Handle non-null assertions which are certainly unnecessary (e.g. in
tests)
2021-04-29 12:11:43 -04:00
Rijk van Zanten
b40c62d257 Add support for SEARCH method (#5183)
* Add search method support for advanced get

* Add docs for SEARCH
2021-04-21 13:35:16 -04:00
Tomáš Petržela
07b85b7eb7 Global cookie parser (#5071)
* removed local cookie parser

* add global cookie parser

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2021-04-15 14:55:07 +00:00
Rijk van Zanten
c2e4100e55 Add root_redirect option (#4937)
* feat: don't expose admin url (optional)

* Rename REDIRECT_TO_ADMIN -> ROOT_REDIRECT, add docs

Co-authored-by: Michael Mullins <mullinsmikey@users.noreply.github.com>
2021-04-09 11:34:50 -04:00
Martijn Boland
bed7890a6b Filter O2M collections with a subquery instead of joins to prevent cartesian products (#4278)
* Cherry-picked fix for 4078 from mssql-to-success branch

* Only use o2m joins in subqueries

* Allow more array nesting in query params

* Clarify naming

* Return empty nested o2m sets as array

Co-authored-by: Martijn Boland <martijn@taiga.nl>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-03-04 16:58:13 -05:00
rijkvanzanten
142b250c8d Use pino error instead of fatal
Fatal throws flushing error when using 'pretty' log style
2021-02-23 11:29:37 -05:00
Rijk van Zanten
f87cbb5824 Make max-payload-size configurable (#4232)
* Make max post size configurable

Closes #2925

* Document max payload size env var
2021-02-22 18:35:07 -05:00
WoLfulus
b8e7c80b72 Application initialization events (#3680)
* Adds `not_found` hook

* Separate hooks and endpoints initialization process

* Adds additional application events

* Remove unused import

* Change the event order to accound for notFound and errorHandler

* Change emitAsync.catch to use the emitAsyncSafe function

* Updated docs, reordered table by lifecycle and usage
2021-02-08 12:30:09 -05:00
rijkvanzanten
673edbe05c Fix dev check 2020-12-21 16:37:19 -05:00
WoLfulus
7f3e095a1f Enable base and admin routes when developing a Directus app 2020-12-17 11:42:50 -03:00
rijkvanzanten
0c72ee6b1d Fix deep filters in app, fix current-user/current-role in filters 2020-11-12 14:12:05 -05:00
rijkvanzanten
53a048ea67 Tweak order of middleware 2020-11-10 15:54:13 -05:00
rijkvanzanten
d49496395f Remove unused import 2020-11-09 17:25:16 -05:00
rijkvanzanten
8cbdfb409b Use prefetched schema info 2020-11-09 17:13:48 -05:00
rijkvanzanten
0697f4b4be Add new overview method, attach it every request 2020-11-09 15:19:23 -05:00
rijkvanzanten
b02c2d85d5 Add more descriptive error on startup on empty DB 2020-11-04 17:28:29 -05:00
maartenvn
54161c0c72 Make PUBLIC_URL end-slash insensitive 2020-10-31 11:23:28 +01:00
maartenvn
6d38ddab76 Redirect to admin URL using relative URL 2020-10-31 11:22:32 +01:00
rijkvanzanten
9a38fdea5e Fix redirect from / in api 2020-10-30 19:04:31 -04:00
rijkvanzanten
91cf8bdfc8 Fix redirect to admin for subpaths 2020-10-30 18:33:41 -04:00
rijkvanzanten
708aea6fb6 Allow App to run under subpath 2020-10-30 18:11:55 -04:00
rijkvanzanten
83971d9bc6 Make app / server creation async
Fixes #690
2020-10-19 16:38:15 -04:00
WoLfulus
a74e0b72a8 Remove response hook 2020-10-17 13:26:00 -03:00
rijkvanzanten
2a9987084a Use terminus 2020-10-15 11:40:12 -04:00
rijkvanzanten
0dd8b9075c Remove unused imports 2020-10-15 11:15:56 -04:00
rijkvanzanten
8a9c0af3a7 Move destroying logic to start cli handler, rename event 2020-10-15 11:15:06 -04:00
rijkvanzanten
00400636a2 Merge branch 'main' into feat/route-hooks 2020-10-15 10:42:27 -04:00
rijkvanzanten
292f2206ed Add ip allow list check 2020-10-13 15:50:23 -04:00
WoLfulus
d999956234 Revert initial changes and add discussion points 2020-10-09 16:03:47 -03:00
WoLfulus
e826a99d09 Add init event with app access 2020-10-09 15:04:45 -03:00
rijkvanzanten
d6e5a45be3 Add response hook 2020-10-06 16:21:36 -04:00
rijkvanzanten
eeedc01c53 Add /utils/revert, use in app
Fixes #485
2020-10-02 16:20:06 -04:00
rijkvanzanten
551cb19e9a Dynamically generate graphql schema, resolve using services 2020-10-02 10:34:47 -04:00
rijkvanzanten
85ca7b5d17 Run prettier 2020-09-22 16:11:28 -04:00
rijkvanzanten
7caf429d1d Add custom endpoints support 2020-09-22 15:55:22 -04:00
rijkvanzanten
48fca55651 Restructure exports for services 2020-09-22 13:16:14 -04:00
rijkvanzanten
e3b731cf7a Handle wrong JSON in post/patch payload
Fixes #80
2020-09-21 16:44:53 -04:00
rijkvanzanten
d9bfd6148f Fix router not reaching 404 handler
Fixes #352
2020-09-21 13:32:03 -04:00
rijkvanzanten
7b2e890925 Add telemetry 2020-09-17 11:52:06 -04:00
rijkvanzanten
a3494384c7 Set token expiration in ms 2020-09-10 16:53:26 -04:00
rijkvanzanten
9546dbb834 Dynamically register / fire webhooks 2020-09-10 14:00:28 -04:00
rijkvanzanten
b19ffd960b Add response middleware and cache 2020-09-08 18:28:23 -04:00
rijkvanzanten
43465a803a Re-add rate limiter 2020-09-08 17:09:04 -04:00
rijkvanzanten
9643b86dc5 Merge branch 'main' into feature-redis-cache 2020-09-08 16:57:15 -04:00
rijkvanzanten
9f3e12f8f2 Run prettier 2020-09-08 16:03:38 -04:00
rijkvanzanten
08eb25fc89 Cleanup app file 2020-09-08 15:53:20 -04:00
kukulaka
9d6f80149c changes for caching
Most changes should be here, just making sure flush cache is in for each post / delete
2020-08-31 17:16:45 +01:00
Tanya Byrne
c8f771c807 Only use rate limiter if rate_limit enabled set to true 2020-08-25 20:21:06 +01:00