# HG changeset patch # User Marcin Kuzminski # Date 2016-07-31 10:57:39 # Node ID 3662eb25dd592ec229ba3e1b42c3b62b56244bf2 # Parent 2f81029adc1825c1a68cdf13aa6ef5610cd4f95d static: change static path to serve rhodecode static assets from dedicated rhodecode path. This helps to serve statics via http server and then still allow plugin statics to work under a common prefix diff --git a/docs/admin/apache-reverse-proxy.rst b/docs/admin/apache-reverse-proxy.rst --- a/docs/admin/apache-reverse-proxy.rst +++ b/docs/admin/apache-reverse-proxy.rst @@ -10,8 +10,8 @@ Here is a sample configuration file for ServerAlias hg.myserver.com ## uncomment to serve static files by Apache - ## ProxyPass /_static ! - ## Alias /_static /path/to/.rccontrol/enterprise-1/static + ## ProxyPass /_static/rhodecode ! + ## Alias /_static/rhodecode /path/to/.rccontrol/enterprise-1/static Order allow,deny diff --git a/docs/admin/nginx-config-example.rst b/docs/admin/nginx-config-example.rst --- a/docs/admin/nginx-config-example.rst +++ b/docs/admin/nginx-config-example.rst @@ -59,7 +59,7 @@ Use the following example to configure N include /etc/nginx/proxy.conf; ## uncomment to serve static files by nginx - # location /_static { + # location /_static/rhodecode { # alias /path/to/.rccontrol/enterprise-1/static; # } diff --git a/rhodecode/config/middleware.py b/rhodecode/config/middleware.py --- a/rhodecode/config/middleware.py +++ b/rhodecode/config/middleware.py @@ -318,7 +318,7 @@ def includeme_first(config): config.add_static_view( '_static/deform', 'deform:static') config.add_static_view( - '_static', path='rhodecode:public', cache_max_age=3600 * 24) + '_static/rhodecode', path='rhodecode:public', cache_max_age=3600 * 24) def wrap_app_in_wsgi_middlewares(pyramid_app, config): """ diff --git a/rhodecode/public/js/src/rhodecode/utils/pyroutes.js b/rhodecode/public/js/src/rhodecode/utils/pyroutes.js --- a/rhodecode/public/js/src/rhodecode/utils/pyroutes.js +++ b/rhodecode/public/js/src/rhodecode/utils/pyroutes.js @@ -168,7 +168,7 @@ var pyroutes = (function() { }; return { 'asset': function(path, ver) { - var asset_url = ASSET_URL || '/_static/'; + var asset_url = ASSET_URL || '/_static/rhodecode/'; var ret = asset_url + path; if (ver !== undefined) { ret += '?ver=' + ver; diff --git a/rhodecode/templates/debug_style/tables.html b/rhodecode/templates/debug_style/tables.html --- a/rhodecode/templates/debug_style/tables.html +++ b/rhodecode/templates/debug_style/tables.html @@ -507,7 +507,7 @@ - + default