Merge branch 'revert-10744d91' into 'master'
authorkaniini <nenolod@gmail.com>
Thu, 17 Jan 2019 23:04:20 +0000 (23:04 +0000)
committerkaniini <nenolod@gmail.com>
Thu, 17 Jan 2019 23:04:20 +0000 (23:04 +0000)
Revert "Merge branch 'fix-html' into 'master'"

See merge request pleroma/relay!9

.gitignore
Procfile [deleted file]
app.json [deleted file]
bin/pre-deploy [deleted file]
relay/actor.py
relay/default.py
relay/nodeinfo.py
relay_template.yaml [deleted file]

index 5011ae1..18f9b3b 100644 (file)
@@ -96,6 +96,3 @@ ENV/
 
 viera.yaml
 viera.jsonld
-
-relay.jsonld
-relay.yaml
diff --git a/Procfile b/Procfile
deleted file mode 100644 (file)
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 (file)
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 (executable)
index 51e37f6..0000000
+++ /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
index 0804897..a8d6613 100644 (file)
@@ -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
index 6c84657..b3a1836 100644 (file)
@@ -14,7 +14,7 @@ async def default(request):
         status=200,
         content_type="text/html",
         charset="utf-8",
-        text="""<!doctype html>
+        text="""
 <html><head>
  <title>ActivityPub Relay at {host}</title>
  <style>
index 11e7f39..5556e14 100644 (file)
@@ -1,4 +1,3 @@
-import os
 import subprocess
 import urllib.parse
 
@@ -11,7 +10,7 @@ from .database import DATABASE
 try:
     commit_label = subprocess.check_output(["git", "rev-parse", "HEAD"]).strip().decode('ascii')
 except:
-    commit_label = os.environ.get('GIT_REV')
+    commit_label = '???'
 
 
 nodeinfo_template = {
diff --git a/relay_template.yaml b/relay_template.yaml
deleted file mode 100644 (file)
index 7c8aec1..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# this is the path that the object graph will get dumped to (in JSON-LD format),
-# you probably shouldn't change it, but you can if you want.
-db: files/relay.jsonld
-
-# Listener
-listen: 0.0.0.0
-port: __PORT__
-
-# Note
-note: "Make a note about your instance here."
-
-# this section is for ActivityPub
-ap:
-  # this is used for generating activitypub messages, as well as instructions for
-  # linking AP identities.  it should be an SSL-enabled domain reachable by https.
-  host: '__HOSTNAME__'
-  blocked_instances: []
-  allowed_instances:
-    - edge.twingyeo.kr
-    - planet.moe
-    - qdon.space
-    - twingyeo.kr
-    - uri.life