You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppose I want to distinguish a local run and a deployment, because I want to set different CORS Origins depending on whether I am running locally or not, how do I do so?
I note that shuttle_runtime::Environment is public but there is no variable that I can use to match it against during the runtime.
Version
cargo-shuttle 0.49.0
Which operating system(s) are you seeing the problem on?
Linux
Which CPU architectures are you seeing the problem on?
No response
Relevant log output
No response
Duplicate declaration
I have searched the issues and there are none like this.
The text was updated successfully, but these errors were encountered:
You can get the Environment through https://docs.rs/shuttle-runtime/latest/shuttle_runtime/struct.Metadata.html (minor changes to its public interface are due soon). You can also check if you are running on Shuttle by checking for the SHUTTLE=true env var or use #[cfg(debug_assertions)] depending on use case.
What happened?
Suppose I want to distinguish a local run and a deployment, because I want to set different CORS Origins depending on whether I am running locally or not, how do I do so?
I note that
shuttle_runtime::Environment
is public but there is no variable that I can use to match it against during the runtime.Version
cargo-shuttle 0.49.0
Which operating system(s) are you seeing the problem on?
Linux
Which CPU architectures are you seeing the problem on?
No response
Relevant log output
No response
Duplicate declaration
The text was updated successfully, but these errors were encountered: