Merge branch 'master' into mononaut/unfurl-fallback-no-cache
This commit is contained in:
@@ -1,4 +1,16 @@
|
||||
const configFile = require('../config.json');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const configPath = process.env.UNFURLER_CONFIG || './config.json';
|
||||
const absolutePath = path.resolve(configPath);
|
||||
let config;
|
||||
|
||||
try {
|
||||
config = JSON.parse(fs.readFileSync(absolutePath, 'utf8'));
|
||||
} catch (e) {
|
||||
console.error(`Could not read config file ${absolutePath}: ${e}`);
|
||||
process.exit(-1);
|
||||
}
|
||||
|
||||
interface IConfig {
|
||||
SERVER: {
|
||||
@@ -57,7 +69,7 @@ class Config implements IConfig {
|
||||
SYSLOG: IConfig['SYSLOG'];
|
||||
|
||||
constructor() {
|
||||
const configs = this.merge(configFile, defaults);
|
||||
const configs = this.merge(config, defaults);
|
||||
this.SERVER = configs.SERVER;
|
||||
this.MEMPOOL = configs.MEMPOOL;
|
||||
this.PUPPETEER = configs.PUPPETEER;
|
||||
|
||||
@@ -344,7 +344,7 @@ class Server {
|
||||
<meta charset="utf-8">
|
||||
<title>${ogTitle}</title>
|
||||
<link rel="canonical" href="${canonical}" />
|
||||
<meta name="description" content="The Mempool Open Source Project® - Explore the full Bitcoin ecosystem with mempool.space™"/>
|
||||
<meta name="description" content="The Mempool Open Source Project® - Explore the full Bitcoin ecosystem with mempool.space®"/>
|
||||
<meta property="og:image" content="${ogImageUrl}"/>
|
||||
<meta property="og:image:type" content="image/png"/>
|
||||
<meta property="og:image:width" content="${matchedRoute.render ? 1200 : 1000}"/>
|
||||
|
||||
Reference in New Issue
Block a user