From 44faf30162c06ad89660fe0b0ee5444aa1505da3 Mon Sep 17 00:00:00 2001 From: kaniini Date: Thu, 17 Jan 2019 23:04:07 +0000 Subject: [PATCH] Revert "Merge branch 'fix-html' into 'master'" This reverts merge request !8 --- .gitignore | 3 --- Procfile | 1 - app.json | 16 ---------------- bin/pre-deploy | 6 ------ relay/actor.py | 10 +--------- relay/default.py | 2 +- relay/nodeinfo.py | 3 +-- relay_template.yaml | 23 ----------------------- 8 files changed, 3 insertions(+), 61 deletions(-) delete mode 100644 Procfile delete mode 100644 app.json delete mode 100755 bin/pre-deploy delete mode 100644 relay_template.yaml diff --git a/.gitignore b/.gitignore index 5011ae1..18f9b3b 100644 --- a/.gitignore +++ b/.gitignore @@ -96,6 +96,3 @@ ENV/ viera.yaml viera.jsonld - -relay.jsonld -relay.yaml diff --git a/Procfile b/Procfile deleted file mode 100644 index 93b6f8b..0000000 --- a/Procfile +++ /dev/null @@ -1 +0,0 @@ -web: python -m relay diff --git a/app.json b/app.json deleted file mode 100644 index 087b641..0000000 --- a/app.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "dokku": { - "volumes": [ - { - "host": "/var/lib/dokku/data/storage/$APP/files", - "app": "/app/files", - "phases": "deploy,run" - } - ] - }, - "scripts": { - "dokku": { - "predeploy": "./bin/pre-deploy" - } - } -} diff --git a/bin/pre-deploy b/bin/pre-deploy deleted file mode 100755 index 51e37f6..0000000 --- a/bin/pre-deploy +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -sed \ - -e "s/__PORT__/${PORT:-5000}/g" \ - -e "s/__HOSTNAME__/$HOSTNAME/g" \ - relay_template.yaml > relay.yaml diff --git a/relay/actor.py b/relay/actor.py index 0804897..a8d6613 100644 --- a/relay/actor.py +++ b/relay/actor.py @@ -35,11 +35,7 @@ from . import app, CONFIG from .remote_actor import fetch_actor -AP_CONFIG = CONFIG.get('ap', { - 'host': 'localhost', - 'blocked_instances': [], - 'allowed_instances': [], -}) +AP_CONFIG = CONFIG.get('ap', {'host': 'localhost','blocked_instances':[]}) CACHE_SIZE = CONFIG.get('cache-size', 16384) @@ -222,10 +218,6 @@ async def handle_follow(actor, data, request): if urlsplit(inbox).hostname in AP_CONFIG['blocked_instances']: return - if AP_CONFIG['allowed_instances'] and\ - urlsplit(inbox).hostname not in AP_CONFIG['allowed_instances']: - return - if inbox not in following: following += [inbox] DATABASE['relay-list'] = following diff --git a/relay/default.py b/relay/default.py index 6c84657..b3a1836 100644 --- a/relay/default.py +++ b/relay/default.py @@ -14,7 +14,7 @@ async def default(request): status=200, content_type="text/html", charset="utf-8", - text=""" + text=""" ActivityPub Relay at {host}