fix(config): restore LIGHTNING_API_CERTIFICATE fallback when no cert path is set#202
Closed
Danswar wants to merge 1 commit into
Closed
fix(config): restore LIGHTNING_API_CERTIFICATE fallback when no cert path is set#202Danswar wants to merge 1 commit into
Danswar wants to merge 1 commit into
Conversation
…path is set Per review on #200: environments without the LND lightning volume (e.g. prod hosted off DFX servers) have no file to mount, so dropping the env var left them without a cert source. Restore it as the fallback when LIGHTNING_API_CERTIFICATE_PATH is unset; a set-but-unreadable path still throws (fail-loud mount check unchanged).
Collaborator
Author
|
Not needed: LDS is fully migrated to DFX servers, so the cert file mount is always available and the read-or-throw path in #200 is the right behavior here. The fallback was only required for dfx-api on Azure (solved by DFXswiss/api#3867). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Counterpart of DFXswiss/api#3868, follow-up to #200 per David's 06-11 note on the cert PRs: hosts without the LND lightning volume (prod dfx-api today is hosted off DFX servers; the same fragility applies here) were left with no cert source after the env-var removal.
readCert(): unsetLIGHTNING_API_CERTIFICATE_PATH→ fall back toLIGHTNING_API_CERTIFICATE(same<br>→newline handling as before feat(config): load LND TLS cert from file with env fallback #200); set path → read-or-throw, unchanged — a broken mount still fails loudly and is never masked by the fallback, which is only consulted when no path is configured.nest buildclean, 22/22 tests pass.