Added API key authentication.

This commit is contained in:
2024-08-31 04:59:05 +02:00
parent da893c1a76
commit e8864ce35b
20 changed files with 514 additions and 28 deletions

View File

@@ -23,7 +23,6 @@ module.exports = {
maxQueryTime: 10000,
},
timeout: 5000,
graphiql: false,
pool: {
min: 0,
max: 20,
@@ -64,6 +63,12 @@ module.exports = {
usernameLength: [2, 24],
usernamePattern: /^[a-zA-Z0-9_-]+$/,
},
apiAccess: {
graphqlEnabled: true,
keySize: 24, // bytes
keyLimit: 5, // max keys per user
keyCooldown: 1, // minutes between key generation
},
psa: {
text: 'Welcome to traxxx!', // html enabled
type: 'notice', // notice, alert