Raymond Weitekamp commited on
Commit
f35a3e9
·
1 Parent(s): c0a58d3

Fix viewer proxy path handling in Nginx configuration

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -2
  2. cadviewer.py +1 -1
Dockerfile CHANGED
@@ -100,9 +100,9 @@ http {\n\
100
  proxy_set_header X-Forwarded-Proto $scheme;\n\
101
  }\n\
102
  \n\
103
- # Viewer route\n\
104
  location /viewer/ {\n\
105
- proxy_pass http://viewer;\n\
106
  proxy_http_version 1.1;\n\
107
  proxy_set_header Upgrade $http_upgrade;\n\
108
  proxy_set_header Connection $connection_upgrade;\n\
 
100
  proxy_set_header X-Forwarded-Proto $scheme;\n\
101
  }\n\
102
  \n\
103
+ # Viewer route - explicitly handle the viewer path\n\
104
  location /viewer/ {\n\
105
+ proxy_pass http://viewer/viewer/;\n\
106
  proxy_http_version 1.1;\n\
107
  proxy_set_header Upgrade $http_upgrade;\n\
108
  proxy_set_header Connection $connection_upgrade;\n\
cadviewer.py CHANGED
@@ -201,7 +201,7 @@ with ui.splitter().classes(
201
  logger.info(f"Space URL: {space_url}")
202
 
203
  # Construct the viewer URL - use relative path for both local and Space environments
204
- viewer_url = "/viewer" # Changed to match Nginx configuration
205
  logger.info(f"Using viewer URL: {viewer_url}")
206
 
207
  ocpcv = (
 
201
  logger.info(f"Space URL: {space_url}")
202
 
203
  # Construct the viewer URL - use relative path for both local and Space environments
204
+ viewer_url = "/viewer/" # Add trailing slash back for proper path handling
205
  logger.info(f"Using viewer URL: {viewer_url}")
206
 
207
  ocpcv = (