Add instances API

This commit is contained in:
Cadence Fish 2020-01-29 00:38:05 +13:00
parent 6f2d686163
commit 246274a9af
No known key found for this signature in database
GPG Key ID: 81015DF9AA8607E1
2 changed files with 8 additions and 2 deletions

View File

@ -11,7 +11,8 @@ let constants = {
// Things that server owners _could_ change if they want to.
caching: {
image_cache_control: `public, max-age=${7*24*60*60}`,
resource_cache_time: 30*60*1000
resource_cache_time: 30*60*1000,
instance_list_cache_time: 3*60*1000
},
// Instagram uses this stuff. This shouldn't be changed, except to fix a bug that hasn't yet been fixed upstream.
@ -23,6 +24,10 @@ let constants = {
shortcode_regex: "[\\w-]+"
},
resources: {
instances_wiki_raw: "https://raw.githubusercontent.com/wiki/cloudrac3r/bibliogram/Instances.md"
},
// My code uses this stuff. Server owners have no reason to change it.
symbols: {
NO_MORE_PAGES: Symbol("NO_MORE_PAGES"),

View File

@ -70,7 +70,8 @@ module.exports = [
"PAGE_PROFILE",
"PAGE_POST",
"API_STATS",
"PAGE_HOME"
"PAGE_HOME",
"API_INSTANCES"
]
}
}