-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: use convict for configuration #190
Conversation
Discussion Points
|
this library might be able to help
Yes definitely, please remove and have the server throw an exception if it is not supplied.
Technically this is an optional environment variable, perhaps we can refactor to simply not include it in the CSP headers in the server response, if no value is supplied?
Sounds good to me, can provide the default alpine install location.
If you mean readme, yes definitely. |
Addressed all concerns |
7e5b0b2
to
7da818e
Compare
7da818e
to
aa0ab4e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some additional thoughts. I also noticed that there are some env vars is spcp-myinfo.factory.js
. Should we be folding this into the new schema as well?
good catch. I didn't even notice them. MyInfo is its own beast? and those env vars should go into |
68ac1c0
to
07d602c
Compare
…in production urls
d80863e
to
38b4292
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few minor nits remaining! also, don't we need to add AWS_ENDPOINT=http://localhost:4572
to docker-compose.yml
so the dev environment doesn't break?
Co-authored-by: Antariksh Mahajan <[email protected]>
Co-authored-by: Antariksh Mahajan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm with one minor comment! thank you for accommodating all my requests!
doc: 'Endpoint for S3 buckets', | ||
format: (val) => | ||
validateBucketUrl(val, { isDev, hasTrailingSlash: false, region }), | ||
default: 'https://s3.ap-southeast-1.amazonaws.com', // NOTE NO TRAILING / AT THE END OF THIS URL! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather add this as an env var in prod than rely on a default the code, since there is a higher chance of messing up the code. But small matter, up to you
This reverts commit 68a9ea5.
Problem
Closes #92
Solution
Refactoring
compulsoryVarsSchema
,optionalVarsSchema
andprodOnlyVarsSchema
to make clear which env vars are needed whentypes/config.ts
Clean-up
SES_RATEDELTA
andSES_RATE
which are deprecated from nodemailerchromiumBin
cspReportUri
to sentry bonus feature, enforce url type and only add to helmet if definedDocumentation
IS_LOGIN_BANNER
which weren'tCSP_REPORT_URI
under sentry bonus featureSecurity
sessionSecret
to prevent accidental non-specificationTests