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
This commit is contained in:
Marcin Kuzminski 2016-07-31 12:57:39 +02:00
parent d181ac58e4
commit 95e32917c7
5 changed files with 6 additions and 6 deletions

View file

@ -10,8 +10,8 @@ Here is a sample configuration file for using Apache as a reverse proxy.
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
<Proxy *>
Order allow,deny

View file

@ -59,7 +59,7 @@ Use the following example to configure Nginx as a your web server.
include /etc/nginx/proxy.conf;
## uncomment to serve static files by nginx
# location /_static {
# location /_static/rhodecode {
# alias /path/to/.rccontrol/enterprise-1/static;
# }

View file

@ -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):
"""

View file

@ -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;

View file

@ -507,7 +507,7 @@
<td class="td-radio"><input type="radio" value="repository.admin"
name="u_perm_1" id="u_perm_1_repositoryadmin"></td>
<td>
<img class="gravatar" src="/_static/images/user30.png" height="16" width="16">
<img class="gravatar" src="/_static/rhodecode/images/user30.png" height="16" width="16">
<span class="user">default</span>
</td>
<td></td>