Mint short links on piha.lc / beta.piha.li (#12)
## Summary - Point `SHORTENER_BASE_URL` at `https://piha.lc` (prod) and `https://beta.piha.li` (beta). - Stop documenting `shortener.aimloperations.com` as the mint host. Closes #11. Depends on url_shortening_service serving `/api/` on the short host. ## Test plan - [ ] Set `SHORTENER_BASE_URL=https://beta.piha.li` and matching token in beta env - [ ] Compose a campaign SMS and confirm mint hits beta.piha.li (not shortener-beta) - [ ] Body contains `https://beta.piha.li/<code>` Reviewed-on: #12
This commit was merged in pull request #12.
This commit is contained in:
@@ -78,12 +78,12 @@ Campaign UTM short links (piha.li) need **both** sides:
|
||||
|
||||
| File | Vars |
|
||||
|------|------|
|
||||
| `monica_site_prod.env` | `SHORTENER_BASE_URL=https://shortener.aimloperations.com` · `SHORTENER_API_TOKEN=monica:<secret>` |
|
||||
| `monica_site_beta.env` | `SHORTENER_BASE_URL=https://shortener-beta.aimloperations.com` · distinct `SHORTENER_API_TOKEN` |
|
||||
| `url_shortening_service_prod.env` | `SHORTENER_API_TOKENS=monica:<same-secret>` · `SHORT_ALLOWED_HOSTS` includes `mkdrealtor.com` · `PUBLIC_SHORT_URL=https://piha.li` |
|
||||
| `monica_site_prod.env` | `SHORTENER_BASE_URL=https://piha.lc` · `SHORTENER_API_TOKEN=monica:<secret>` |
|
||||
| `monica_site_beta.env` | `SHORTENER_BASE_URL=https://beta.piha.li` · distinct `SHORTENER_API_TOKEN` |
|
||||
| `url_shortening_service_prod.env` | `SHORTENER_API_TOKENS=monica:<same-secret>` · `SHORT_ALLOWED_HOSTS` includes `mkdrealtor.com` · `PUBLIC_SHORT_URL=https://piha.lc` |
|
||||
| `url_shortening_service_beta.env` | matching beta token · `PUBLIC_SHORT_URL=https://beta.piha.li` |
|
||||
|
||||
Generate the secret with `python -c "import secrets; print(secrets.token_urlsafe(32))"`. Do not put it in git. Call the API host, never `piha.li`, to mint links.
|
||||
Generate the secret with `python -c "import secrets; print(secrets.token_urlsafe(32))"`. Do not put it in git. Mint and redirects share the short host; Bearer is required on `/api/`.
|
||||
|
||||
## Deploy
|
||||
|
||||
|
||||
Reference in New Issue
Block a user