mirror of https://gitlab.com/litecord/litecord.git
nodeinfo: add MAIN_URL config usage
This commit is contained in:
parent
c4a63016ea
commit
d061ec6376
|
|
@ -6,9 +6,11 @@ bp = Blueprint('nodeinfo', __name__)
|
||||||
@bp.route('/.well-known/nodeinfo')
|
@bp.route('/.well-known/nodeinfo')
|
||||||
async def _dummy_nodeinfo_index():
|
async def _dummy_nodeinfo_index():
|
||||||
proto = 'http' if not app.config['IS_SSL'] else 'https'
|
proto = 'http' if not app.config['IS_SSL'] else 'https'
|
||||||
|
main_url = app.config.get('MAIN_URL', request.host)
|
||||||
|
|
||||||
return jsonify({
|
return jsonify({
|
||||||
'links': [{
|
'links': [{
|
||||||
'href': f'{proto}://{request.host}/nodeinfo/2.0.json',
|
'href': f'{proto}://{main_url}/nodeinfo/2.0.json',
|
||||||
'rel': 'http://nodeinfo.diaspora.software/ns/schema/2.0'
|
'rel': 'http://nodeinfo.diaspora.software/ns/schema/2.0'
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue