Etherpadfix Teil1
This commit is contained in:
@@ -38,7 +38,12 @@ def add_ep_cookie(request, response):
|
||||
domain=".2020.fet.at",
|
||||
path="/"
|
||||
)
|
||||
|
||||
response.set_cookie(
|
||||
"sessionID",
|
||||
ep_sessid,
|
||||
expires=expires,
|
||||
path="/etherpad"
|
||||
)
|
||||
return response
|
||||
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@ https://docs.djangoproject.com/en/3.0/ref/settings/
|
||||
|
||||
import os
|
||||
import environ
|
||||
from urllib.parse import urljoin
|
||||
|
||||
env = environ.Env(
|
||||
# set casting, default value
|
||||
DEBUG=(bool, True),
|
||||
@@ -186,10 +188,9 @@ USE_TZ = True
|
||||
STATIC_URL = '/assets/'
|
||||
|
||||
STATICFILES_DIRS = [
|
||||
os.path.join(BASE_DIR, "static"),
|
||||
os.path.join(BASE_DIR, "static_design1"),
|
||||
os.path.join(BASE_DIR, "static")
|
||||
]
|
||||
|
||||
STATIC_ROOT = 'assets/'
|
||||
MEDIA_ROOT = os.path.join(BASE_DIR, 'files/')
|
||||
MEDIA_URL = '/files/'
|
||||
|
||||
@@ -219,9 +220,22 @@ THUMBNAIL_ALIASES = {
|
||||
},
|
||||
}
|
||||
|
||||
ETHERPAD_CLIENT = {
|
||||
'url': "http://localhost:9003",
|
||||
'exturl': "https://etherpad2.2020.fet.at/",
|
||||
'apikey': "/srv/andis_test/etherpad_test2/etherpad-lite/APIKEY.txt"
|
||||
|
||||
if DEBUG:
|
||||
ETHERPAD_CLIENT = {
|
||||
'url': "http://localhost:9001",
|
||||
'exturl': "https://etherpad2.2020.fet.at/",
|
||||
'apikey': "/srv/etherpad/APIKEY.txt"
|
||||
}
|
||||
else:
|
||||
ETHERPAD_CLIENT = {
|
||||
'url': "http://etherpad",
|
||||
'exturl': urljoin(env('HOST_NAME'),"etherpad"),
|
||||
'apikey': "/app/etherpad/APIKEY.txt"
|
||||
}
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
'DEFAULT_PERMISSION_CLASSES': [
|
||||
'rest_framework.permissions.AllowAny',
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user