diff --git a/docker/config/apache/001-trame.conf b/docker/config/apache/001-trame.conf index d0c0d39d..808dcd5e 100644 --- a/docker/config/apache/001-trame.conf +++ b/docker/config/apache/001-trame.conf @@ -5,21 +5,28 @@ Options Indexes FollowSymLinks - Order allow,deny - Allow from all AllowOverride None Require all granted + # Set CORS headers Header set Access-Control-Allow-Origin "*" # Handle launcher forwarding ProxyPass /launcher http://localhost:9000/paraview + ProxyPassReverse /launcher http://localhost:9000/paraview + + # Handle paraview forwarding ProxyPass /paraview http://localhost:9000/paraview + ProxyPassReverse /paraview http://localhost:9000/paraview # Handle WebSocket forwarding RewriteEngine On RewriteMap session-to-port txt:/opt/trame/proxy-mapping.txt RewriteCond %{QUERY_STRING} ^sessionId=(.*)&path=(.*)$ [NC] RewriteRule ^/proxy.*$ ws://${session-to-port:%1}/%2 [P] + + # Handle API forwarding + RewriteRule ^/api/(.*)/(.*)$ http://${session-to-port:$1}/$2 [P,L] +