mirror of
https://github.com/Eugeny/tabby-web.git
synced 2026-08-17 06:46:05 +01:00
added demo iframe page
This commit is contained in:
@@ -12,6 +12,7 @@ urlpatterns = [
|
||||
|
||||
path('app-dist/<version>/<path:path>', views.AppDistView.as_view()),
|
||||
path('terminal', views.TerminalView.as_view()),
|
||||
path('demo', views.DemoView.as_view()),
|
||||
|
||||
path('', include(api.urlpatterns)),
|
||||
]
|
||||
|
||||
@@ -22,6 +22,13 @@ class TerminalView(APIView):
|
||||
return response
|
||||
|
||||
|
||||
class DemoView(APIView):
|
||||
def get(self, request, format=None):
|
||||
response = static.serve(request, 'demo.html', document_root=str(settings.STATIC_ROOT))
|
||||
response['X-Frame-Options'] = 'ALLOW-FROM https://tabby.sh'
|
||||
return response
|
||||
|
||||
|
||||
class AppDistView(APIView):
|
||||
def get(self, request, version=None, path=None, format=None):
|
||||
fs = fsspec.filesystem(urlparse(settings.APP_DIST_STORAGE).scheme)
|
||||
|
||||
Reference in New Issue
Block a user