-
Notifications
You must be signed in to change notification settings - Fork 2
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
Enable the use of .env for setting runtime variables and non-static setting of CORS allow_origins #86
Conversation
…rams. Also accept a list of CORS allowed origin URLs instead of hardcoding them.
…he Rust backend expects
…actor_platform_rs binary
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.
This looks great! Thank you for adding this.
Just a question and a request:
Q: Does this mean we will not have to specify a .env
file when running the app with docker-compose? If so will it correctly distinguish between something like .env
and .env.local
?
R: Could you provide a new example .env
file in the docs that uses the new variable names?
web/src/lib.rs
Outdated
@@ -22,6 +25,7 @@ pub(crate) mod extractors; | |||
mod router; | |||
|
|||
pub async fn init_server(app_state: AppState) -> Result<()> { | |||
info!("Connecting to DB with URI: {}", app_state.config.database_uri()); |
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 wonder if it would make sense to change this to debug!
so we don't log the URI in production? Thinking more of down the line if we are using like an AWS database. Not really sure if the URI itself would contain any sensitive information but just a thought.
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.
Great question, I actually had it as debug originally but I messed up the order in my mind. I'm going to switch this to TRACE so that it only shows up when we really want it to. And at some point we may even decide that this is not even necessary.
It appears that by default, dotenvy only loads a .env, but it does have a function if we want to provide a way to load from something custom-named like .env-local.
Happy to. |
Description
This PR enables the use of .env for setting runtime variables alongside CLI params. Also accept a list of CORS allowed origin URLs instead of hardcoding them.
GitHub Issue: None
Changes
Testing Strategy
Concerns
None