diff --git a/jwql/website/apps/jwql/templates/explore_image.html b/jwql/website/apps/jwql/templates/explore_image.html index 84ca74bcc..d32090840 100644 --- a/jwql/website/apps/jwql/templates/explore_image.html +++ b/jwql/website/apps/jwql/templates/explore_image.html @@ -22,77 +22,8 @@

{{ file_root }}_{{ filetype }}.fits

- -
-
-
-
-
-
-
-
-
-
-
-
- Loading ... -
-
- - -
- - - -

Data Settings

-
-
- - -
- -
- Extension:   - {% for extension in extensions %} - {% if extension == 'SCI' %} - {{ extension }}      - {% else %} - {{ extension }}      - {% endif %} - {% endfor %} -
- -
-
- - -
-
- - -
-
-
- - -
-
-
- - -
-
- - -
-
-
-

- Apply Settings -

+
- -
diff --git a/jwql/website/apps/jwql/views.py b/jwql/website/apps/jwql/views.py index 80dafba37..505f2ef26 100644 --- a/jwql/website/apps/jwql/views.py +++ b/jwql/website/apps/jwql/views.py @@ -924,10 +924,13 @@ def explore_image(request, inst, file_root, filetype): context = {'inst': inst, 'file_root': file_root, 'filetype': filetype, + 'file_path': full_fits_file, 'extensions': extensions, 'extension_groups': extension_groups, 'extension_ints': extension_ints, 'base_url': get_base_url(), + 'jdaviz_host': get_config()["jdaviz"]["host"], + 'jdaviz_port': get_config()["jdaviz"]["port"], 'anomaly_form': anomaly_form, 'comment_form': comment_form} diff --git a/jwql/website/jwql_proj/settings.py b/jwql/website/jwql_proj/settings.py index 6568eceeb..bac81cd08 100644 --- a/jwql/website/jwql_proj/settings.py +++ b/jwql/website/jwql_proj/settings.py @@ -40,6 +40,10 @@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = get_config()['django_debug'] +# Security settings to allow Jdaviz quicklook +# Might well be avoidable if the Jdaviz Solara server were behind an SSH reverse proxy. +X_FRAME_OPTIONS = "SAMEORIGIN" +SECURE_CONTENT_TYPE_NOSNIFF = False ALLOWED_HOSTS = ['*'] @@ -52,6 +56,7 @@ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'revproxy.apps.RevProxyConfig' ] MIDDLEWARE = [ @@ -163,4 +168,5 @@ CSRF_TRUSTED_ORIGINS = ['https://jwql.stsci.edu', 'https://jwql-test.stsci.edu', 'https://jwql-dev.stsci.edu', - 'https://127.0.0.1'] + 'https://127.0.0.1', + 'http://dljwql.stsci.edu'] diff --git a/jwql/website/jwql_proj/urls.py b/jwql/website/jwql_proj/urls.py index e3e224260..53929063f 100644 --- a/jwql/website/jwql_proj/urls.py +++ b/jwql/website/jwql_proj/urls.py @@ -47,9 +47,14 @@ """ from django.contrib import admin -from django.urls import include, path +from django.urls import include, path, re_path +from revproxy.views import ProxyView from ..apps.jwql import views +from jwql.utils.utils import get_config + +jdaviz_host = get_config()["jdaviz"]["host"] +jdaviz_port = get_config()["jdaviz"]["port"] # Define custom error page views handler404 = views.not_found # Page not found @@ -60,4 +65,5 @@ urlpatterns = [ path('', include('jwql.website.apps.jwql.urls')), path('admin/', admin.site.urls), + re_path(r'(?Pquickview.*)', ProxyView.as_view(upstream=f'http://{jdaviz_host}:{jdaviz_port}', add_x_forwarded=True)) ]