Rijk van Zanten
31fbb5f06f
Fix type casting of boolean env var ( #6190 )
...
Fixes #6189
2021-06-10 16:44:56 -04:00
Pascal Jufer
a2a35aaab5
Add support for _FILE environment variables ( #6101 )
...
* Add support for _FILE environment variables
* Enhance processing of _FILE env vars
* Same processing as with other env vars (do not simply treat as string)
- tested successfully
* Warn if both variables are set (EXAMPLE and EXAMPLE_FILE)
* Add comments to make it easier to understand the code
* Set newKey only after file read was successful
* Don't convert value > MAX_SAFE_INTEGER to number
Thanks to @skizer!
As stated by @skizer (from #6119 ):
Altho it seems that we do have a numerical value
it can happen that its outside of Number.MAX_SAFE_INTEGER
thus resulting in a change of the original intended value
e.g oauth -> discord -> client_id
* Fix recursive logger-env import
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com >
2021-06-09 14:08:26 -04:00
skizer
ad8bd3e7cd
Don't treat numbers larger than the JS max number size as number values in environment variables ( #6119 )
...
* Incorrect parsing of numeric values in env.
* Fixes incorrect parsing of the env. file with numeric values that are outside of Number.MAX_SAFE_INTEGER resulting in unwanted behaviour.
- Like wrong client_ids for oauth. (tested with discord oauth)
* Removed unnecessary multiple "IF" statements since value can only be ether one of the listed values.
* Implements custom_param for OAUTH via grant
According to grants documentation you can provide additionally custom parameters to supported OAUTH provider with ```custom_params```.
This change allows to add them in JSON format and thus adding multiple parameters.
* Fix linter warnings, remove JSON support in favor of nested Grant support
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com >
2021-06-09 11:53:57 -04:00
Rijk van Zanten
45730c6860
Resolve linter warnings ( #6008 )
2021-06-02 13:21:13 -04:00
nichols-green
e1e47453ef
Changed PORT type from number to string ( #6001 )
2021-06-02 11:47:12 -04:00
Rijk van Zanten
77e00b7db4
Don't initialize database on file require ( #6003 )
2021-06-02 11:41:42 -04:00
Rijk van Zanten
02089a6227
Tweak default cache ttl
2021-05-26 10:52:16 -04:00
Rijk van Zanten
8d3102fbad
Add max concurrency and max image transform size support ( #5795 )
...
* Add assets concurrency and max size controls
* Render no-thumbnail images nicer in app
* Document new asset environment variables
* Update package-lock
2021-05-20 18:18:10 -04:00
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
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
Thijs-Jan
df107352c2
Resolve relative CONFIG_PATH ( #4453 )
2021-03-09 16:03:01 -05:00
rijkvanzanten
c2a5622cef
Remove unused environment variable
2021-02-26 10:49:19 -05:00
rijkvanzanten
b087967c29
Prioritize env vars over stored vars in config file
...
Fixes #4191
2021-02-22 20:21:50 -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
Juan Carlos Blanco Delgado
7dee95e8aa
Adding syntax prefix parsing to specific types instead of only string var ( #4190 )
...
* Adding syntax prefix parsing to specific types instead of only strings env variables
* Update api/src/env.ts
* Update docs/reference/environment-variables.md
* Update docs/reference/environment-variables.md
* Ignore pre-parsed types
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com >
2021-02-22 11:36:24 -05:00
rijkvanzanten
eb9069c42c
Don't use string parsed values in .env
2021-02-19 15:09:14 -05:00
rijkvanzanten
ee96c99ec5
Don't fail on missing config file
...
Fixes #4106
2021-02-16 17:14:24 -05:00
YannickMol
7830453cfc
Align CORS environment variables between middleware and cos ( #4099 )
...
* Align CORS environment variables between middleware and cos
Fixes #4080
* Move CORS environment variables to env.ts
2021-02-16 14:56:09 -05:00
WoLfulus
813c731d27
Add config override support to env module ( #4029 )
...
* add override support for env module
* Override instead of merge w/ config file
* Default to reading .env instead of process.env
* Make env available in process.env
* Add docs for config-files
* Extend note
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com >
2021-02-16 11:38:07 -05:00
rijkvanzanten
2f005063cd
Force type of certain env vars
...
Fixes #3705
2021-01-27 11:37:51 -05:00
rijkvanzanten
bfb2df432e
Replace ASSETS_CACHE_CONTROL with ASSETS_CACHE_TTL
2020-12-16 14:47:15 -05:00
rijkvanzanten
578b761ded
Add auto-purge option
...
And add cache-control header when auto purge is disabled
Fixes #3425
2020-12-16 14:26:38 -05:00
rijkvanzanten
ab0ade5375
Add way to set Cache-Control header for static assets
...
Fixes #3332
2020-12-16 13:53:50 -05:00
Igor Savin
7cddb458cb
Run prettier across app and api
2020-12-08 02:22:00 +02:00
rijkvanzanten
08c248f4a0
Don't treat leading zero values as numbers
...
Fixes #3216
2020-11-27 18:42:25 -05:00
JuanCarlosJr97
e6aa40d5c2
Undoing change made by mistake to CACHE_ENABLED instead of CORS_ENABLED
2020-11-04 08:33:58 +00:00
JuanCarlosJr97
606f81dd0b
Updating CORS_ENABLED to true as documentation describes
2020-11-04 08:32:18 +00:00
JuanCarlosJr97
2fc00a7842
Updating CORS_ENABLED to true by default
...
Updating CORS_ENABLED to true by default as the documentation describes
2020-11-04 02:01:13 +00:00
rijkvanzanten
91bfcb875f
Don't auto convert , to arrays in env
...
Fixes #782
2020-10-26 19:38:36 +01:00
rijkvanzanten
cac329c783
Convert env var values that contain , to arrays
2020-10-15 17:45:15 -04:00
rijkvanzanten
07ed30a4c9
Don't treat empty string as number
2020-10-12 15:55:25 -04:00
Rijk van Zanten
39d040682a
Update api/src/env.ts
2020-10-12 14:21:39 -04:00
mscbpi
e5b5f57b15
use isNaN instead of isNumeric
2020-10-12 18:52:55 +02:00
mscbpi
075f153404
Update env.ts
...
convert numeric values to number
2020-10-12 18:00:36 +02:00
rijkvanzanten
23458b5b9f
Last port change, promise
2020-10-02 16:26:40 -04:00
rijkvanzanten
1524c3e398
Change default port to 8805
2020-10-02 14:56:39 -04:00
rijkvanzanten
67a55ad228
Disable rate limiter by default
...
Fixes #323
2020-09-18 12:30:15 -04:00
rijkvanzanten
e8b842297c
Move telemetry flag to env
2020-09-17 11:55:45 -04:00
rijkvanzanten
7b2e890925
Add telemetry
2020-09-17 11:52:06 -04:00
rijkvanzanten
b19ffd960b
Add response middleware and cache
2020-09-08 18:28:23 -04:00
rijkvanzanten
266c07fde7
Temporarily disable caching
2020-09-08 17:22:34 -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
9231e7c732
Change default config for rate limiter
2020-09-08 15:51:22 -04:00
rijkvanzanten
862002bf9c
Add true/false parsing to env
2020-09-08 14:57:15 -04:00
rijkvanzanten
756c4a712d
Remove DB_SSL from required env flags list
2020-09-08 12:37:47 -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
db3c2f675f
Updating cache so memory used by default
2020-08-27 16:53:35 +01:00
Tanya Byrne
69b0333dc8
adding to env
2020-08-27 16:22:05 +01:00