Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IEs don't work with upstream proxying rules #471

Closed
hexylena opened this issue Jul 16, 2015 · 4 comments
Closed

IEs don't work with upstream proxying rules #471

hexylena opened this issue Jul 16, 2015 · 4 comments
Assignees

Comments

@hexylena
Copy link
Member

The default proxy rules suggest the following:

RewriteRule   ^/galaxy/static/style/(.*)     /home/galaxy/galaxy/static/june_2007_style/blue/$1   [L]
RewriteRule   ^/galaxy/plugins/(.*)          /home/galaxy/galaxy/config/plugins/$1 [L]
RewriteRule   ^/galaxy/static/scripts/(.*)   /home/galaxy/galaxy/static/scripts/packed/$1         [L]
RewriteRule   ^/galaxy/static/(.*)           /home/galaxy/galaxy/static/$1                        [L]
RewriteRule   ^/galaxy/favicon.ico           /home/galaxy/galaxy/static/favicon.ico               [L]
RewriteRule   ^/galaxy/robots.txt            /home/galaxy/galaxy/static/robots.txt                [L]

Specifically we take note of

RewriteRule   ^/galaxy/plugins/(.*)          /home/galaxy/galaxy/config/plugins/$1 [L]

which intends to match plugin JS files. Unfortunately this fails for interactive environments which still appear under a URL with visualization in it. I.e. https://FQDN/galaxy/plugins/visualizations/ipython/static/js/ipython.js should be https://FQDN/galaxy/plugins/interactive_environments/ipython/static/js/ipython.js

This doesn't appear without the upstream proxy, and short of symlinking IE files into the visualizations directory, there's no obvious solution.
CC @carlfeberhard

@carlfeberhard
Copy link
Contributor

@erasche
If I could get https://FQDN/galaxy/plugins/interactive_environments to be int_envs' base static url, would that work for this? It would/could break the existing static urls, but probably needed to happen a while ago.

@hexylena
Copy link
Member Author

yes, precisely! It's a separate directory in $GALAXY_ROOT/config/plugins, we just need all of the generated URLs to match that, rather than saying plugins.

@carlfeberhard
Copy link
Contributor

@erasche Can you see if this is what you were looking for:
https://github.com/carlfeberhard/galaxy/commits/int_envs.seperate ?

@hexylena
Copy link
Member Author

@carlfeberhard it sure is! Thanks a million. Would you mind adding this change as part of your PR?

diff --git a/lib/galaxy/web/base/interactive_environments.py b/lib/galaxy/web/base/interactive_environments.py
index a146123..8cf456f 100644
--- a/lib/galaxy/web/base/interactive_environments.py
+++ b/lib/galaxy/web/base/interactive_environments.py
@@ -28,7 +28,7 @@ class InteractiveEnviornmentRequest(object):
         self.attr.galaxy_config = trans.app.config
         self.attr.galaxy_root_dir = os.path.abspath(self.attr.galaxy_config.root)
         self.attr.root = web.url_for("/")
-        self.attr.app_root = self.attr.root + "plugins/visualizations/" + self.attr.viz_id + "/static/"
+        self.attr.app_root = self.attr.root + "plugins/interactive_environments/" + self.attr.viz_id + "/static/"

         plugin_path = os.path.abspath( plugin.path )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants