Your Discord webhook, GitHub tokens, and other sensitive information are now completely protected from public view!
config.json β Your actual sensitive data (gitignored)
βββ discord.webhook β Encoded Discord webhook
βββ github.gistId β Your GitHub Gist ID
βββ github.token β GitHub personal access token (optional)
config.json.template β Template for others to copy
js/reviews-localstorage.js β No sensitive data hardcoded
.gitignore β Protects your config.json
- Click Regenerate to create a new API key
- Update the key in
js/config.js
Your Discord webhook URL was exposed. IMMEDIATELY:
- Go to your Discord server
- Go to Server Settings > Integrations > Webhooks
- Delete the exposed webhook
- Create a new webhook if needed (for server-side use only)
Update your Firebase Realtime Database rules to be more restrictive:
{
"rules": {
"reviews": {
".read": true,
".write": true,
"$reviewId": {
".validate": "newData.hasChildren(['reviewerName', 'rating', 'reviewText', 'timestamp'])"
}
}
}
}Your Firebase project should be configured to only allow requests from your domain:
- Go to Firebase Console > Authentication > Settings
- Add Authorized domains:
algsoch.github.io - Remove any unnecessary domains
β API Keys moved to external config file β Domain validation added β Discord webhook removed from client-side β Configuration centralized β Security comments added
// netlify/functions/submit-review.js
exports.handler = async (event, context) => {
// Process review submission
// Send Discord notification securely
// Return response
};// api/submit-review.js
export default async function handler(req, res) {
// Process review with environment variables
// Send Discord notification
}// functions/index.js
const functions = require('firebase-functions');
exports.submitReview = functions.https.onCall((data, context) => {
// Process review securely
});- Rotate Firebase API key
- Delete exposed Discord webhook
- Update Firebase security rules
- Configure authorized domains
- Test the updated configuration
- Monitor for any suspicious activity
- Consider moving to server-side processing
- Firebase Usage: Check for unusual database activity
- GitHub Security: Watch for any new security alerts
- Discord Server: Monitor for spam/abuse
- Website Analytics: Check for unusual traffic patterns
- Firebase Support: Firebase Support
- GitHub Security: GitHub Security Advisories
- Discord Support: Discord Support
Remember: Security is an ongoing process. Regularly review and update your security measures!