Skip to content

Serve campaign vanity links directly from the backend (#964) - #965

Merged
JoaquinBN merged 1 commit into
mainfrom
dev
Aug 3, 2026
Merged

Serve campaign vanity links directly from the backend (#964)#965
JoaquinBN merged 1 commit into
mainfrom
dev

Conversation

@JoaquinBN

Copy link
Copy Markdown
Collaborator
  • Serve campaign vanity links directly from the backend

The backend now answers the public /join// contract itself, in addition to the internal /campaigns/redirect path. Production hosting is CloudFront + S3 rather than Amplify, so the CDN only needs a plain /join/* pass-through behavior pointing at the backend origin, with no edge URL rewriting. The Amplify rule (used only by Amplify-hosted environments) now targets the live backend domain instead of the retired Lightsail host.

Claude Implementation Notes

  • backend/tally/urls.py: top-level re_path serving /join// via campaigns.views.campaign_redirect (name campaign_join); /campaigns/redirect/... unchanged
  • backend/campaigns/tests/test_resolver.py: /join path resolves with correct utm_id and 404s unknown aliases
  • amplify.yml: /join/<> target updated to https://portal-admin.genlayer.foundation/join/<> (old Lightsail host is dead); comment documents the CloudFront equivalent for production
  • backend/CLAUDE.md: resolver docs reflect the direct /join route and the CloudFront + S3 production setup
  • Complete the public join-route contract in docs and tests

The public /join redirect test now asserts the full contract (302 with Cache-Control no-store for both GET and HEAD, optional trailing slash, unknown alias 404), and the backend docs describe the exact CloudFront pass-through configuration and list the /join endpoint instead of the obsolete Amplify-proxy claim.

Claude Implementation Notes

  • backend/campaigns/tests/test_resolver.py: join-path test asserts no-store on GET and HEAD, trailing slash, and 404
  • backend/CLAUDE.md: endpoint summary lists GET /join/{role}/{alias} with the CDN pass-through note; campaigns section names the CloudFront methods (GET/HEAD), CachingDisabled cache policy, and AllViewerExceptHostHeader origin request policy

* Serve campaign vanity links directly from the backend

The backend now answers the public /join/<role>/<alias> contract itself, in
addition to the internal /campaigns/redirect path. Production hosting is
CloudFront + S3 rather than Amplify, so the CDN only needs a plain /join/*
pass-through behavior pointing at the backend origin, with no edge URL
rewriting. The Amplify rule (used only by Amplify-hosted environments) now
targets the live backend domain instead of the retired Lightsail host.

## Claude Implementation Notes
- backend/tally/urls.py: top-level re_path serving /join/<role>/<alias> via campaigns.views.campaign_redirect (name campaign_join); /campaigns/redirect/... unchanged
- backend/campaigns/tests/test_resolver.py: /join path resolves with correct utm_id and 404s unknown aliases
- amplify.yml: /join/<*> target updated to https://portal-admin.genlayer.foundation/join/<*> (old Lightsail host is dead); comment documents the CloudFront equivalent for production
- backend/CLAUDE.md: resolver docs reflect the direct /join route and the CloudFront + S3 production setup

* Complete the public join-route contract in docs and tests

The public /join redirect test now asserts the full contract (302 with
Cache-Control no-store for both GET and HEAD, optional trailing slash,
unknown alias 404), and the backend docs describe the exact CloudFront
pass-through configuration and list the /join endpoint instead of the
obsolete Amplify-proxy claim.

## Claude Implementation Notes
- backend/campaigns/tests/test_resolver.py: join-path test asserts no-store on GET and HEAD, trailing slash, and 404
- backend/CLAUDE.md: endpoint summary lists GET /join/{role}/{alias} with the CDN pass-through note; campaigns section names the CloudFront methods (GET/HEAD), CachingDisabled cache policy, and AllViewerExceptHostHeader origin request policy
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e6c9f0e8-1ce0-474e-9001-89849f4ae0cc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@JoaquinBN
JoaquinBN merged commit 737e4c3 into main Aug 3, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants