feat(examples): configurable download URL, default to staging website on staging Cryptify#40
Merged
Merged
Conversation
… on staging Cryptify Files uploaded to the staging Cryptify are only retrievable through the staging PostGuard website (staging.postguard.eu), but the examples were displaying download links pointing at postguard.eu — which 404s on staging content. Add a PG_DOWNLOAD_URL / PUBLIC_DOWNLOAD_URL variable with a default that tracks the Cryptify staging heuristic, so the download URL shown to the developer actually works against whatever Cryptify they pointed the example at.
This was referenced May 24, 2026
2 tasks
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.
Summary
Files uploaded to the staging Cryptify (
storage.staging.postguard.eu) are only retrievable through the staging PostGuard website atstaging.postguard.eu— but both examples were printing/rendering download links pointing atpostguard.eu, which 404s on staging content.Adds a configurable base URL with a sensible default:
pg-dotnet: newPG_DOWNLOAD_URLenv var / user-secret.Program.csresolves it viaIConfigurationand uses{downloadBaseUrl}/download?uuid=…in both flows' output.pg-sveltekit: newPUBLIC_DOWNLOAD_URLenv var.config.tsexportsDOWNLOAD_URL; the success view in+page.svelteuses it for the/download?uuid=…link.Default in both:
https://staging.postguard.euwhen*_CRYPTIFY_URLlooks like a staging host (existing heuristic), elsehttps://postguard.eu. Override either via env var / user-secret if your deployment differs.Both READMEs and
pg-sveltekit/.env.exampledocument the new variable.Test plan
pg-dotnet:dotnet runagainst default config — both flows printhttps://staging.postguard.eu/download?uuid=….pg-sveltekit: run locally with default config and confirm the rendered download link points atstaging.postguard.eu.PG_DOWNLOAD_URL/PUBLIC_DOWNLOAD_URLexplicitly and confirm the override takes effect./dobby please review