From 81c3aff710b10340e785153d346d347ca65e04a6 Mon Sep 17 00:00:00 2001 From: David Beniamine <david.beniamine@tetras-libre.fr> Date: Wed, 9 Nov 2022 22:58:19 +0100 Subject: [PATCH] Set annotot protocol --- .env.template | 2 ++ src/index.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.env.template b/.env.template index a51a082..9c263e4 100644 --- a/.env.template +++ b/.env.template @@ -29,6 +29,8 @@ ANNOTOT_LISTEN_IP=0.0.0.0 ANNOTOT_HOST=localhost # For production only ANNOTOT_SECRET_KEY_BASE=insert-a-random-key-here +# http or https +ANNOTOT_PROTO=http # For traefik (optionnal) NAME=IIIF HOST=IIIF.tetras-lab.io diff --git a/src/index.js b/src/index.js index e6ea0a1..b1b987d 100644 --- a/src/index.js +++ b/src/index.js @@ -5,7 +5,7 @@ import annotationPlugins from 'mirador-annotations/es/index'; import LocalStorageAdapter from 'mirador-annotations/es/LocalStorageAdapter'; import AnnototAdapter from 'mirador-annotations/es/AnnototAdapter'; -const endpointUrl = `http://${process.env.ANNOTOT_HOST}:${process.env.ANNOTOT_PORT}/annotations`; +const endpointUrl = `${process.env.ANNOTOT_PROTO}://${process.env.ANNOTOT_HOST}:${process.env.ANNOTOT_PORT}/annotations`; const config = { annotation: { adapter: (canvasId) => new AnnototAdapter(canvasId, endpointUrl), -- GitLab