teddit-reddit-frontend-alte.../config.js.template

39 lines
1.9 KiB
Plaintext
Raw Normal View History

2020-12-03 18:12:04 +01:00
const config = {
domain: '127.0.0.1', // Or for example 'teddit.net'
2020-12-04 17:11:02 +01:00
reddit_app_id: 'H6-HjZ5pUPjaFQ', // You should obtain your own Reddit app ID. For testing purposes it's okay to use this project's default app ID. Create your Reddit app here: https://old.reddit.com/prefs/apps/. Make sure to create an "installed app" type of app.
2020-12-03 18:12:04 +01:00
cert_dir: '', // For example '/home/teddit/letsencrypt/live/teddit.net', if you are using https. No trailing slash.
video_enabled: true,
2020-12-05 21:48:15 +01:00
redis_host: '127.0.0.1',
redis_port: 6379,
2020-12-03 18:12:04 +01:00
ssl_port: 8088,
nonssl_port: 8080,
listen_address: '0.0.0.0',
https_enabled: false,
redirect_http_to_https: false,
2020-12-04 17:11:02 +01:00
redirect_www: false,
2020-12-03 18:12:04 +01:00
use_compression: true,
use_view_cache: false,
use_helmet: false, // Recommended to be true when using https
use_helmet_hsts: false, // Recommended to be true when using https
trust_proxy: false, // Enable trust_proxy if you are using reverse proxy like nginx
trust_proxy_address: '127.0.0.1',
setexs: {
/**,
* Redis cache expiration values (in seconds).
* When the cache expires, new content is fetched from Reddit's API (when
* the given URL is revisited).
*/
frontpage: 600,
subreddit: 600,
posts: 600,
user: 600,
searches: 600,
sidebar: 60 * 60 * 24 * 7 // 7 days
},
2020-12-04 17:30:54 +01:00
post_comments_sort: 'confidence', // "confidence" is the default sorting in Reddit. Must be one of: confidence, top, new, controversial, old, random, qa, live.
2020-12-03 18:12:04 +01:00
valid_media_domains: ['preview.redd.it', 'external-preview.redd.it', 'i.redd.it', 'v.redd.it', 'a.thumbs.redditmedia.com', 'b.thumbs.redditmedia.com', 'thumbs.gfycat.com', 'i.ytimg.com'],
reddit_api_error_text: `Seems like your instance is either blocked (e.g. due to API rate limiting), reddit is currently down, or your API key is expired and not renewd properly. This can also happen for other reasons.`
};
module.exports = config;