Giter Club home page Giter Club logo

Comments (3)

LewisArdern avatar LewisArdern commented on August 26, 2024

please post your full config and i will review it, remove any sensitive info

from bxss.

 avatar commented on August 26, 2024

Thanks for your help

const config = {};

config.twilio = {};
config.gmail = {};
config.slack = {};
config.letsEncrypt = {};
config.ciscoSpark = {};
config.discord = {};
config.twitter = {};
config.github = {};
config.port = 443;

config.port.http = process.env.httpPort || 80;
config.url = process.env.url || 'mydomain.com';
config.url = 'mydomain.com';
config.boundary = process.env.boundary || '#!!!!#';
config.bodyLimit = process.env.bodyLimit || '50mb';

config.letsEncrypt.TLS = true;
config.port.https = 443;
  process.env.httpsPort || 443;
config.letsEncrypt.publicKey = `/etc/letsencrypt/live/mydomain.com/fullchain.pem`;
  process.env.publicKey || `/etc/letsencrypt/live/${config.url}/fullchain.pem`;
config.letsEncrypt.privateKey = `/etc/letsencrypt/live/mydomain.com/privkey.pem`;
  process.env.privateKey || `/etc/letsencrypt/live/${config.url}/privkey.pem`;
config.letsEncrypt.ca = `/etc/letsencrypt/live/mydomain.com/chain.pem`;
  process.env.ca || `/etc/letsencrypt/live/${config.url}/chain.pem`;

// Remove if you dont' want Twilio
// config.twilio.accountSid = process.env.accountSid || '';
// config.twilio.authToken = process.env.authToken || '';
// config.twilio.to = process.env.twilioTo || ['']; // add additonal numbers with comma seperation e.g '+447000000', ''
// config.twilio.from = process.env.twilioFrom || '';

// Remove if you dont want Discord
// config.discord.token = process.env.discordToken || '';
// config.discord.channel = process.env.discordChannel || '';

// Remove if you dont want Slack
// config.slack.token = process.env.token || '';
// config.slack.channel = process.env.slackChannel || '';

// Remove if you dont want Cisco Webex Teams
// config.ciscoSpark.token = process.env.sparkToken || '';
// config.ciscoSpark.sparkRoom = process.env.sparkRoom || ['']; // add additonal emails with comma seperation e.g '[email protected]', ''

// Remove if you don't want Twitter
// config.twitter.consumer_key = process.env.twitterConsumerKey || '';
// config.twitter.consumer_secret = process.env.twitterSecret || '';
// config.twitter.access_token_key = process.env.twitterAccessKey || '';
// config.twitter.access_token_secret = process.env.twitterAccessSecret || '';
// config.twitter.recipient_id = process.env.recipient || ['']; // add additional recipients which can be comma seperation e.g '12030210321','1232131321'

// Remove if you don't want email
// config.smtp.user = process.env.smtpUser || '[email protected]';
// config.smtp.pass = process.env.smtpPass || 'hunter2';
// config.smtp.port = process.env.smtpPort || '469';
// config.smtp.host = process.env.smtpHost || 'smtp.example.com';
// config.smtp.tls = process.env.smtpTls || true; // true or false
// config.smtp.to = process.env.smtpTo || ['[email protected]']; // add additonal emails with comma seperation '', ''

// Remove if you don't want github
// config.github.accessToken = process.env.accessToken || '';
// config.github.repo = process.env.githubRepo || '';

// 1 Everything
// 0 Just DOM Nodes
config.intrusiveLevel = 0;

module.exports = config;

from bxss.

LewisArdern avatar LewisArdern commented on August 26, 2024

You need to decide if you are going to run as HTTP or HTTPS. Are you running it beind anything? if you arent using HTTPS all you need to do is:

const config = {};
config.port = {};

config.port.http = process.env.httpPort || 80;

config.url = process.env.url || 'localhost';  // <-- your domain

config.boundary = process.env.boundary || '#!!!!#';
config.bodyLimit = process.env.bodyLimit || '50mb';

config.letsEncrypt.TLS = false;

If you intend to use HTTPS, then you can do:

const config = {};
config.port = {};

config.port.http = process.env.httpPort || 80;

config.url = process.env.url || 'localhost';  // <-- your domain

config.boundary = process.env.boundary || '#!!!!#';
config.bodyLimit = process.env.bodyLimit || '50mb';

config.letsEncrypt.TLS = true;
config.port.https = process.env.httpsPort || 443;
config.letsEncrypt.publicKey =
  process.env.publicKey || `/etc/letsencrypt/live/${config.url}/fullchain.pem`;
config.letsEncrypt.privateKey =
  process.env.privateKey || `/etc/letsencrypt/live/${config.url}/privkey.pem`;
config.letsEncrypt.ca = process.env.ca || `/etc/letsencrypt/live/${config.url}/chain.pem`;

from bxss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.