-
Notifications
You must be signed in to change notification settings - Fork 14
/
config.py
32 lines (25 loc) · 1001 Bytes
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import os
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv())
API_NAME = os.environ['api_name']
API_URI = os.environ['api_uri']
WTF_CSRF_ENABLED = True
SECRET_KEY = os.environ['secret_key']
DB_NAME = 'Cluster0'
MONGO_URI = os.environ['mongodb_uri']
MONGO_DBNAME = 'Cluster0'
valid_header = 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'
CONTENT_HEADERS = {'Content-Type': valid_header}
ACCEPT_HEADERS = {'Accept': valid_header}
# specified by ActivityPub/ActivityStreams
VALID_HEADERS = (
'application/ld+json; profile="https://www.w3.org/ns/activitystreams"',
'application/ld+json; profile=\'https://www.w3.org/ns/activitystreams\'',
'application/activity+json')
DEFAULT_HEADERS = {}
# require that all requests to the API conform to ActivityPub's expected headers
STRICT_HEADERS = False
# require that the API run over HTTPS
STRICT_HTTPS = False
TOKEN_ENDPOINT = 'https://tokens.indieauth.com/token'
ME = 'https://pylodon.rowan.website'