settings site changes
This commit is contained in:
@@ -16,7 +16,9 @@ const {
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
// Intentionally no trust-proxy: loopback-only; global rate-limit bucket.
|
||||
// Intentionally no trust-proxy: reachable only from peers on broccoli-net
|
||||
// (not publicly exposed). Rate limit keys off the raw connection IP, which
|
||||
// inside the docker bridge is the peer container's address.
|
||||
const internalLimiter = rateLimit({
|
||||
windowMs: 60 * 1000,
|
||||
max: 10,
|
||||
@@ -40,7 +42,7 @@ router.use((req, res, next) => {
|
||||
router.get('/config', (req, res) => {
|
||||
const map = readAllConfig();
|
||||
const obj = {};
|
||||
const REDACTED = ['DISCORD_TOKEN', 'REFRESH_TOKEN', 'GOOGLE_CLIENT_SECRET', 'MONGODB_URI', 'INTERNAL_API_SECRET', 'SETTINGS_ADMIN_PASSWORD'];
|
||||
const REDACTED = ['DISCORD_TOKEN', 'REFRESH_TOKEN', 'GOOGLE_CLIENT_SECRET', 'MONGODB_URI', 'INTERNAL_API_SECRET', 'SETTINGS_ADMIN_PASSWORD', 'SETTINGS_ADMIN_PASSWORD_2'];
|
||||
for (const [k, v] of map) {
|
||||
obj[k] = REDACTED.includes(k) ? '••••••••' : v;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user