Skip to content

Commit

Permalink
chore: 将drawio集成到jmalcloud_nginx镜像中
Browse files Browse the repository at this point in the history
  • Loading branch information
jamebal committed May 31, 2024
1 parent 680a994 commit 52e7535
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nginx:latest
FROM jmal/nginx-drawio:latest

COPY nginx.conf /etc/nginx/nginx.conf

Expand Down
6 changes: 3 additions & 3 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/components/office/Drawio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 52e7535

Please sign in to comment.