2.0 KiB
2.0 KiB
20260706 cnnetmkt auth primary route fix
Problem
https://cnnetmkt.top/ could be opened, but login redirected users to https://auth.h.imruyi.top:8443. Casdoor then rejected the OAuth request because https://cnnetmkt.top/casdoor/callback/ was not in the application allow-list.
*.h.imruyi.top:8443 is retained as a backup domain only and must not be exposed as the primary public login URL.
Runtime Changes
- Added
auth.cnnetmkt.topNginx server block onhw.imruyi.topusing the wildcardcnnetmkt.topcertificate. - Proxied
auth.cnnetmkt.topto the existing backup/home Casdoor upstreamauth.h.imruyi.top:8443while preserving the public host asauth.cnnetmkt.top. - Recreated
user-control-web,user-control-worker, anduser-control-beatwith:CASDOOR_PUBLIC_BASE_URL=https://auth.cnnetmkt.topCASDOOR_INTERNAL_BASE_URL=https://auth.cnnetmkt.topCASDOOR_INVITE_SYNC_BASE_URL=https://auth.cnnetmkt.topUCC_PUBLIC_BASE_URL=https://cnnetmkt.top
- Updated Casdoor application
admin/aios-portalonaihostto includehttps://cnnetmkt.top/casdoor/callback/and keep user/portal/backup callbacks.
Backups
- Casdoor DB application table backup:
/data/aios/backups/casdoor-cnnetmkt-primary-20260706T085445Z/application-before.sql - HW UCC/Nginx backup directory:
/data/aios-gitops/backups/auth-cnnetmkt-primary-*
Verification
https://cnnetmkt.top/redirects to/portal/login/and then tohttps://auth.cnnetmkt.top/login/oauth/authorize?...redirect_uri=https%3A%2F%2Fcnnetmkt.top%2Fcasdoor%2Fcallback%2F....https://auth.cnnetmkt.top/login/oauth/authorize?...returns HTTP 200 from the Casdoor SPA through the HW Nginx proxy.user-control-webhealth returnedhealthyafter recreation.- Casdoor DB readback contains
https://cnnetmkt.top/casdoor/callback/inapplication.redirect_uris.
Follow-up
Run ops/gitops-migration/check_cnnetmkt_auth_primary.sh after any domain, Nginx, or Casdoor application change.