Merge branch 'master' into mononaut/unfurl-fallback-no-cache

This commit is contained in:
wiz
2024-02-22 15:51:57 +09:00
committed by GitHub
502 changed files with 140617 additions and 75899 deletions

View File

@@ -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;

View File

@@ -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&reg; - Explore the full Bitcoin ecosystem with mempool.space&reg;"/>
<meta property="og:image" content="${ogImageUrl}"/>
<meta property="og:image:type" content="image/png"/>
<meta property="og:image:width" content="${matchedRoute.render ? 1200 : 1000}"/>