Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
1e518c6
refactor: split config parsing from file reading
gagantrivedi Oct 17, 2026
e69d705
feat: start without a config file
gagantrivedi Oct 17, 2026
5c4e452
feat: override settings from environment variables
gagantrivedi Oct 17, 2026
c09af18
docs: document environment variable configuration
gagantrivedi Oct 17, 2026
b8c39c8
refactor: rename config file contents variable
gagantrivedi Oct 17, 2026
3babebf
refactor: map env fields to conversion functions
gagantrivedi Oct 17, 2026
285af62
refactor: derive env-settable fields from AppSettings
gagantrivedi Oct 17, 2026
12b8b2d
refactor: decode env values per field type
gagantrivedi Oct 17, 2026
800debb
refactor: drop json_or_value comment
gagantrivedi Oct 17, 2026
0c78c6c
refactor: look up env fields in serialized defaults
gagantrivedi Oct 17, 2026
83d23e7
refactor: rename json_or_value to json_str_or_native
gagantrivedi Oct 17, 2026
1ff645a
fix: ignore non-UTF-8 environment variables
gagantrivedi Oct 17, 2026
053abde
fix: require the config file when CONFIG_PATH is set
gagantrivedi Oct 17, 2026
4238491
fix: ignore empty environment variables
gagantrivedi Oct 17, 2026
fb47eda
docs: add ALLOW_ORIGINS example and CONFIG_PATH rule
gagantrivedi Oct 17, 2026
e4323c4
fix: log a missing config file instead of failing
gagantrivedi Oct 17, 2026
9bcf446
fix: default the health check grace period when omitted
gagantrivedi Oct 17, 2026
9fb884d
refactor: rename config path variables in get_settings
gagantrivedi Oct 31, 2026
bd9055b
refactor: resolve missing config file in one match
gagantrivedi Oct 31, 2026
a7689cb
refactor: keep the config file path as a String
gagantrivedi Oct 31, 2026
2581f0b
refactor: rename env var iterator variables
gagantrivedi Oct 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ tower-http = { version = "0.6", features = ["compression-gzip", "cors", "trace",
reqwest = { version = "0.13", features = ["json", "gzip"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_path_to_error = "0.1"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
thiserror = "2"
Expand Down
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ docker run --rm -p 8000:8000 edge-proxy-rs-local

## Configuration

Edge Proxy expects to load configuration from `./config.json`.
Edge Proxy loads configuration from `./config.json` and environment variables. Environment variables take precedence, and
the config file is optional.

### Configuration Options

Expand Down Expand Up @@ -125,6 +126,21 @@ docker run \
flagsmith/edge-proxy-rs:latest
```

### Settings from Environment Variables

Any top-level setting can be set with an environment variable of the same name, case-insensitive. String settings take
the value as-is; all others take JSON. An environment variable replaces the whole setting, so
`LOGGING='{"log_level":"DEBUG"}'` resets the other logging settings to their defaults. Empty values are ignored.

```bash
docker run \
-e ENVIRONMENT_KEY_PAIRS='[{"server_side_key":"ser.YOUR_SERVER_KEY","client_side_key":"YOUR_CLIENT_KEY"}]' \
-e API_POLL_FREQUENCY_SECONDS=30 \
-e ALLOW_ORIGINS='["https://app.example.com"]' \
-p 8000:8000 \
flagsmith/edge-proxy-rs:latest
```

### Environment Variables

| Variable | Description | Default |
Expand Down
Loading
Loading