From c3486c566a3a2404ae2dd6ba581bab871b931eba Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Wed, 8 Jun 2022 07:42:03 +0200 Subject: [PATCH] :bug: Fix exporter to frontend communication --- docker/images/config.env | 3 +++ exporter/src/app/renderer/bitmap.cljs | 2 +- exporter/src/app/renderer/pdf.cljs | 2 +- exporter/src/app/renderer/svg.cljs | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docker/images/config.env b/docker/images/config.env index 0174efe90..ad1ee70ad 100644 --- a/docker/images/config.env +++ b/docker/images/config.env @@ -79,3 +79,6 @@ PENPOT_FLAGS="enable-registration" # PENPOT_LDAP_ATTRS_FULLNAME=cn # PENPOT_LDAP_ATTRS_PHOTO=jpegPhoto # PENPOT_LOGIN_WITH_LDAP=true + +# Exporter +PENPOT_DOMAIN_WHITE_LIST=localhost:9001 diff --git a/exporter/src/app/renderer/bitmap.cljs b/exporter/src/app/renderer/bitmap.cljs index 96dff8bea..8283f6d03 100644 --- a/exporter/src/app/renderer/bitmap.cljs +++ b/exporter/src/app/renderer/bitmap.cljs @@ -61,7 +61,7 @@ :page-id page-id :object-id (mapv :id objects) :route "objects"} - uri (-> (or uri (cf/get :public-uri)) + uri (-> (cf/get :public-uri) (assoc :path "/render.html") (assoc :query (u/map->query-string params)))] (bw/exec! (prepare-options uri) (partial render uri))))) diff --git a/exporter/src/app/renderer/pdf.cljs b/exporter/src/app/renderer/pdf.cljs index be57229f9..e4c26392f 100644 --- a/exporter/src/app/renderer/pdf.cljs +++ b/exporter/src/app/renderer/pdf.cljs @@ -63,6 +63,6 @@ (on-object (assoc object :path path)) (p/recur (rest objects))))))] - (let [base-uri (or uri (cf/get :public-uri))] + (let [base-uri (cf/get :public-uri)] (bw/exec! (prepare-options base-uri) (partial render base-uri))))) diff --git a/exporter/src/app/renderer/svg.cljs b/exporter/src/app/renderer/svg.cljs index 73d518779..f0dfe7991 100644 --- a/exporter/src/app/renderer/svg.cljs +++ b/exporter/src/app/renderer/svg.cljs @@ -363,7 +363,7 @@ :render-embed true :object-id (mapv :id objects) :route "objects"} - uri (-> (or uri (cf/get :public-uri)) + uri (-> (cf/get :public-uri) (assoc :path "/render.html") (assoc :query (u/map->query-string params)))] (bw/exec! (prepare-options uri)