Place public urls if you plan to use Attendize as a backend service intended for internal usage, with a separate frontend #975
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.
I'm not sure how much is this an issue for other users of this repo. But in my opinion frontend is the face of the business so we develop custom frontend for our. And we encountered the issue that all the urls are built with the url from request object. Which is a problem when:
The most important part of this PR is two helpers:
public_route
&app_url
.First function exists to produce links to public urls. For example a link to download tickets will be opened on custom frontend.
Second was created to put absolute links to assets in emails. Because if you trigger email generation from private docker network all links would be inaccessible from public network.
Both helpers work by basically always forcing specific domain. For
public_route
it is a domain set inPUBLIC_URL
env variable. Forapp_url
it always forcesAPP_URL
env var.Both will still generate regular url if PUBLIC_URL was not set.