feat: add HTTP_INTERNAL env variable

This commit is contained in:
Isaac 2024-01-20 20:50:35 +00:00
parent 89b94bc5ab
commit 10eef10216
No known key found for this signature in database
GPG Key ID: 0DE40AE37BBA5C33
2 changed files with 3 additions and 2 deletions

View File

@ -20,6 +20,7 @@ const env = {
ENCRYPTION_KEY: randomBytes(24).toString('hex'), ENCRYPTION_KEY: randomBytes(24).toString('hex'),
HTTP_EXTERNAL: 'http://127.0.0.1:8169', HTTP_EXTERNAL: 'http://127.0.0.1:8169',
HTTP_HOST: '0.0.0.0', HTTP_HOST: '0.0.0.0',
HTTP_INTERNAL: '',
HTTP_PORT: 8169, HTTP_PORT: 8169,
HTTP_TRUST_PROXY: false, HTTP_TRUST_PROXY: false,
NODE_ENV: 'production', // not bot-specific NODE_ENV: 'production', // not bot-specific

View File

@ -6,7 +6,7 @@ const { join } = require('path');
const { files } = require('node-dir'); const { files } = require('node-dir');
const { PermissionsBitField } = require('discord.js'); const { PermissionsBitField } = require('discord.js');
process.env.ORIGIN = process.env.HTTP_EXTERNAL; process.env.ORIGIN = process.env.HTTP_INTERNAL || process.env.HTTP_EXTERNAL;
module.exports = async client => { module.exports = async client => {
// oauth2 plugin // oauth2 plugin