Score:0

Nginx proxy_pass to draw.io docker container error - Uncaught SyntaxError: Unexpected token '<'

sk flag
skg

Nginx reverse proxy running on physical host and draw.io running on docker on the same physical host where Nginx running. Draw.io built on tomcat 9.0.56.

Nginx draw.io 80 block.

server {
    listen      80;
    server_name diagram.corp.example.com;

  proxy_connect_timeout       600;
  proxy_send_timeout          600;
  proxy_read_timeout          600;
  send_timeout                600;

  access_log /var/log/nginx/diagram/access.log;
  error_log /var/log/nginx/diagram/error.log;


    location / {

        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_pass http://127.0.0.1:8082/?offline=1&https=0;
    }

}

Able to access the draw.io using http://<host_IP_address>:8082/?offline=1&https=0 but not with the domain name http://diagram.corp.example.com.

Seeing the below message when try to access using the domain name - Page could not be loaded. Please try refreshing. Please ensure JavaScript is enabled.

Inspect Element errors:

 Uncaught SyntaxError: Unexpected token '<' /js/PreConfig.js:2 Uncaught
 SyntaxError: Unexpected token '<' /js/app.min.js:2 Uncaught
 SyntaxError: Unexpected token '<' /js/PostConfig.js:2 Uncaught
 ReferenceError: App is not defined (index):238
     at checkAllLoaded (.......
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.