2020-01-28 03:14:21 +00:00
|
|
|
/*
|
|
|
|
Welcome to the constants file!
|
|
|
|
Copy a key and provide a new value in /config.js to override the value here.
|
|
|
|
Please read the comments above every section!
|
|
|
|
*/
|
2020-01-12 12:50:21 +00:00
|
|
|
|
2020-01-28 03:14:21 +00:00
|
|
|
let constants = {
|
|
|
|
// Things that server owners _should_ change!
|
|
|
|
website_origin: "http://localhost:10407",
|
|
|
|
|
|
|
|
// Things that server owners _could_ change if they want to.
|
|
|
|
caching: {
|
|
|
|
image_cache_control: `public, max-age=${7*24*60*60}`,
|
2020-01-28 11:38:05 +00:00
|
|
|
resource_cache_time: 30*60*1000,
|
|
|
|
instance_list_cache_time: 3*60*1000
|
2020-01-28 03:14:21 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
// Instagram uses this stuff. This shouldn't be changed, except to fix a bug that hasn't yet been fixed upstream.
|
2020-01-12 12:50:21 +00:00
|
|
|
external: {
|
2020-01-30 12:51:59 +00:00
|
|
|
user_query_hash: "c9100bf9110dd6361671f113dd02e7d6",
|
2020-01-12 12:50:21 +00:00
|
|
|
timeline_query_hash: "e769aa130647d2354c40ea6a439bfc08",
|
2020-01-18 15:38:14 +00:00
|
|
|
shortcode_query_hash: "2b0673e0dc4580674a88d426fe00ea90",
|
2020-01-14 14:38:33 +00:00
|
|
|
timeline_fetch_first: 12,
|
2020-01-18 15:38:14 +00:00
|
|
|
username_regex: "[\\w.]+",
|
|
|
|
shortcode_regex: "[\\w-]+"
|
2020-01-12 12:50:21 +00:00
|
|
|
},
|
|
|
|
|
2020-01-28 11:38:05 +00:00
|
|
|
resources: {
|
|
|
|
instances_wiki_raw: "https://raw.githubusercontent.com/wiki/cloudrac3r/bibliogram/Instances.md"
|
|
|
|
},
|
|
|
|
|
2020-01-28 03:14:21 +00:00
|
|
|
// My code uses this stuff. Server owners have no reason to change it.
|
2020-01-12 12:50:21 +00:00
|
|
|
symbols: {
|
2020-01-26 14:56:59 +00:00
|
|
|
NO_MORE_PAGES: Symbol("NO_MORE_PAGES"),
|
|
|
|
TYPE_IMAGE: Symbol("TYPE_IMAGE"),
|
|
|
|
TYPE_VIDEO: Symbol("TYPE_VIDEO"),
|
|
|
|
TYPE_GALLERY: Symbol("TYPE_GALLERY"),
|
|
|
|
TYPE_GALLERY_IMAGE: Symbol("TYPE_GALLERY_IMAGE"),
|
2020-01-27 06:03:28 +00:00
|
|
|
TYPE_GALLERY_VIDEO: Symbol("TYPE_GALLERY_VIDEO"),
|
|
|
|
NOT_FOUND: Symbol("NOT_FOUND"),
|
2020-01-30 03:05:43 +00:00
|
|
|
NO_SHARED_DATA: Symbol("NO_SHARED_DATA"),
|
|
|
|
INSTAGRAM_DEMANDS_LOGIN: Symbol("INSTAGRAM_DEMANDS_LOGIN")
|
2020-01-12 12:50:21 +00:00
|
|
|
}
|
|
|
|
}
|
2020-01-28 03:14:21 +00:00
|
|
|
|
|
|
|
// Override values from config and export the result
|
|
|
|
const md = require("mixin-deep")
|
|
|
|
const config = require("../../config")
|
|
|
|
constants = md(constants, config)
|
|
|
|
module.exports = constants
|