chore: 将drawio集成到jmalcloud_nginx镜像中

This commit is contained in:
jmal 2024-05-31 15:54:09 +08:00
parent 680a994052
commit 52e7535e15
3 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
FROM nginx:latest
FROM jmal/nginx-drawio:latest
COPY nginx.conf /etc/nginx/nginx.conf

View File

@ -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;

View File

@ -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)