diff --git a/Dockerfile b/Dockerfile index 1654b55..d84c7cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM nginx:latest +FROM jmal/nginx-drawio:latest COPY nginx.conf /etc/nginx/nginx.conf diff --git a/nginx.conf b/nginx.conf index 56edb75..c792359 100644 --- a/nginx.conf +++ b/nginx.conf @@ -178,12 +178,12 @@ http { proxy_set_header Connection $connection_upgrade; } - location /draw { - proxy_pass http://jmalcloud:8080; + location /drawio/webapp/ { + proxy_pass http://localhost:8080/; proxy_http_version 1.1; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-PORT $remote_port; - proxy_set_header X-Forwarded-Host $the_host/draw; + proxy_set_header X-Forwarded-Host $the_host//drawio/webapp; proxy_set_header X-Forwarded-Proto $the_scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; diff --git a/src/components/office/Drawio.vue b/src/components/office/Drawio.vue index b0ee3b7..b7792d0 100644 --- a/src/components/office/Drawio.vue +++ b/src/components/office/Drawio.vue @@ -85,7 +85,7 @@ export default { let theme = 'kennedy' let title = this.file.name ? encodeURIComponent(this.file.name) : '' let query = `?title=${title}&chrome=${chrome}&lightbox=${lightbox}&ui=${theme}&lang=${language}&offline=0&pwa=0&embed=1&noLangIcon=1&noExitBtn=1&noSaveBtn=1&saveAndExit=0&spin=1&proto=json` - this.url = $J.apiUrl(`../draw/?${query}`) + this.url = $J.apiUrl(`..../drawio/webapp/?${query}`) }, mounted() { window.addEventListener('message', this.handleMessage)