Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,25 @@ server {
proxy_read_timeout 300s;
}

# Canonical invite URL. It is what the Top.gg listing, the README CTA and
# every tracked campaign link point at, so it has to reach Discord rather
# than the SPA. The frontend has no /invite route and its catch-all sends
# unknown paths to the landing page, which silently swallowed every invite
# click (#1888). vercel.json carries the same redirect for preview
# deploys, but production is served through the Cloudflare tunnel to this
# nginx, so the rule has to exist here too.
#
# permissions=3165184 is View Channels, Send Messages, Embed Links,
# Connect, Speak. NOT Administrator: the public listings state that Lucky
# asks for no admin permission. Keep in sync with getBotInviteUrl() in
# packages/frontend/src/lib/discord.ts.
#
# 302, not 301: browsers cache 301 permanently, so a wrong client_id or
# permission set would be unfixable for anyone who had already clicked.
location = /invite {
return 302 "https://discord.com/oauth2/authorize?client_id=962198089161134131&scope=bot%20applications.commands&permissions=3165184";
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
Resolved
}

location /api {
set $backend_upstream http://backend:3000;
proxy_pass $backend_upstream;
Expand Down
Loading