commented out change address

This commit is contained in:
bill bittner 2017-06-29 12:35:36 -07:00
parent c0174fb300
commit 461af60c16
4 changed files with 15 additions and 10 deletions

View file

@ -8,7 +8,7 @@ module.exports = {
// const payAddress = config.get('WalletConfig.LbryPayAddress');
const claimAddress = config.get('WalletConfig.LbryClaimAddress');
// const changeAddress = config.get('WalletConfig.LbryChangeAddress');
// ensure nsfw is a boolean
// filter nsfw and ensure it is a boolean
if (nsfw === false) {
nsfw = false;
} else if (nsfw.toLowerCase === 'false') {
@ -35,7 +35,7 @@ module.exports = {
nsfw,
},
claim_address: claimAddress,
//change_address: changeAddress,
// change_address: changeAddress,
};
logger.debug('publishParams:', publishParams);
return publishParams;

View file

@ -3,8 +3,9 @@ const { postToAnalytics } = require('../helpers/libraries/analytics');
module.exports = app => {
// route for the home page
app.get('/', ({ originalUrl, ip }, res) => {
logger.debug(`GET request on ${originalUrl} from ${ip}`);
app.get('/', ({ originalUrl, ip, headers }, res) => {
logger.verbose(`GET request on ${originalUrl} from ${ip}`);
logger.debug(`headers ${JSON.stringify(headers)}`);
res.status(200).render('index');
});
// a catch-all route if someone visits a page that does not exist

View file

@ -34,9 +34,10 @@ function serveFile ({ fileName, fileType, filePath }, res) {
module.exports = (app) => {
// route to fetch one free public claim
app.get('/:name/:claim_id', ({ originalUrl, params, ips, headers }, res) => {
logger.debug(`GET request on ${originalUrl} from ${ips}`);
logger.debug(`headers ${headers}`);
app.get('/:name/:claim_id', ({ originalUrl, params, ip, ips, headers }, res) => {
logger.verbose(`GET request on ${originalUrl} from ${ip}`);
logger.debug(`ips >> ${JSON.stringify(ips)}`);
logger.debug(`headers >> ${JSON.stringify(headers)}`);
// begin image-serve processes
serveController
.getClaimByClaimId(params.name, params.claim_id)
@ -49,9 +50,10 @@ module.exports = (app) => {
});
});
// route to fetch one free public claim
app.get('/:name', ({ originalUrl, params, ips, headers }, res) => {
logger.debug(`GET request on ${originalUrl} from ${ips}`);
logger.debug(`headers ${headers}`);
app.get('/:name', ({ originalUrl, params, ip, ips, headers }, res) => {
logger.verbose(`GET request on ${originalUrl} from ${ip}`);
logger.debug(`ips >> ${JSON.stringify(ips)}`);
logger.debug(`headers >> ${JSON.stringify(headers)}`);
// begin image-serve processes
serveController
.getClaimByName(params.name)

View file

@ -25,6 +25,7 @@ const db = require('./models');
app.use(express.static(`${__dirname}/public`));
// configure express app
app.enable('trust proxy'); // trust the proxy to get ip address for us
app.use(bodyParser.json()); // for parsing application/json
app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded
app.use(siofu.router);
@ -68,6 +69,7 @@ const http = require('./routes/sockets-routes.js')(app, siofu, hostedContentPath
// start server
db.sequelize.sync().then(() => {
http.listen(PORT, () => {
winston.info('Trusting proxy?', app.get('trust proxy'));
winston.info(`Server is listening on PORT ${PORT}`);
});
});