mirror of
https://github.com/exchanges-lab/view.git
synced 2026-08-05 05:36:06 +08:00
Add build.sh for Cloudflare Pages env-based config injection
- Add build.sh that generates auth-config.js from environment variables (API_BASE_URL, GOOGLE_CLIENT_ID, ALLOWED_EMAILS) at build time - Move email whitelist from hardcoded login.html to window.ALLOWED_EMAILS in auth-config.js, so it can be configured via env vars - Reset auth-config.js to placeholder defaults in repo - Update README.md and README_CN.md deployment docs for both options Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -127,7 +127,7 @@
|
||||
const userData = parseJwt(credential);
|
||||
|
||||
// Email whitelist verification
|
||||
const allowedEmails = ['xiannvweideta@gmail.com'];
|
||||
const allowedEmails = window.ALLOWED_EMAILS || ['your-email@gmail.com'];
|
||||
if (!allowedEmails.includes(userData.email)) {
|
||||
document.getElementById('error-msg').textContent = 'Access denied: unauthorized email.';
|
||||
document.getElementById('error-msg').style.display = 'block';
|
||||
|
||||
Reference in New Issue
Block a user