configuration option for type of PDF viewer fixes #337

This commit is contained in:
jonaswinkler
2021-01-14 13:35:21 +01:00
parent 244775c264
commit af58998e44
11 changed files with 165 additions and 91 deletions

View File

@@ -179,6 +179,12 @@ if ENABLE_HTTP_REMOTE_USER:
'rest_framework.authentication.RemoteUserAuthentication'
)
# X-Frame options for embedded PDF display:
if DEBUG:
X_FRAME_OPTIONS = 'ANY'
else:
X_FRAME_OPTIONS = 'SAMEORIGIN'
# We allow CORS from localhost:8080
CORS_ALLOWED_ORIGINS = tuple(os.getenv("PAPERLESS_CORS_ALLOWED_HOSTS", "http://localhost:8000").split(","))