mirror of
https://github.com/Eugeny/tabby-web.git
synced 2026-08-18 23:36:05 +01:00
a unified docker image
This commit is contained in:
@@ -12,12 +12,12 @@ class IndexView(APIView):
|
||||
def get(self, request, format=None):
|
||||
if settings.FRONTEND_URL:
|
||||
return HttpResponseRedirect(settings.FRONTEND_URL)
|
||||
return static.serve(request, 'index.html', document_root=str(settings.FRONTEND_BUILD_DIR))
|
||||
return static.serve(request, 'index.html', document_root=str(settings.STATIC_ROOT))
|
||||
|
||||
|
||||
class TerminalView(APIView):
|
||||
def get(self, request, format=None):
|
||||
response = static.serve(request, 'terminal.html', document_root=str(settings.FRONTEND_BUILD_DIR))
|
||||
response = static.serve(request, 'terminal.html', document_root=str(settings.STATIC_ROOT))
|
||||
response['X-Frame-Options'] = 'SAMEORIGIN'
|
||||
return response
|
||||
|
||||
|
||||
Reference in New Issue
Block a user