You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by je...@apache.org on 2015/10/19 13:37:40 UTC

[15/50] [abbrv] allura git commit: [#7976] no caching of resources during development - particularly needed since Chrome caches sourcemaps even if dev tools has caching off

[#7976] no caching of resources during development - particularly needed since Chrome caches sourcemaps even if dev tools has caching off


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/34e5195c
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/34e5195c
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/34e5195c

Branch: refs/heads/ib/7924
Commit: 34e5195c9c6bb3c502b7c439354cb2742146ad87
Parents: 79b2b98
Author: Dave Brondsema <da...@brondsema.net>
Authored: Mon Sep 28 13:48:49 2015 -0400
Committer: Heith Seewald <hs...@hsmb.local>
Committed: Fri Oct 2 10:01:48 2015 -0400

----------------------------------------------------------------------
 Allura/allura/config/middleware.py | 4 +++-
 Allura/development.ini             | 4 ++++
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/34e5195c/Allura/allura/config/middleware.py
----------------------------------------------------------------------
diff --git a/Allura/allura/config/middleware.py b/Allura/allura/config/middleware.py
index 6c39d4b..5ce50a3 100644
--- a/Allura/allura/config/middleware.py
+++ b/Allura/allura/config/middleware.py
@@ -158,7 +158,9 @@ def _make_core_app(root, global_conf, full_stack=True, **app_conf):
         # compress=True,
         script_name=app_conf.get('ew.script_name', '/_ew_resources/'),
         url_base=app_conf.get('ew.url_base', '/_ew_resources/'),
-        extra_headers=eval(app_conf.get('ew.extra_headers', 'None')))
+        extra_headers=eval(app_conf.get('ew.extra_headers', 'None')),
+        cache_max_age=asint(app_conf.get('ew.cache_header_seconds', 60*60*24*365)),
+    )
     # Handle static files (by tool)
     app = StaticFilesMiddleware(app, app_conf.get('static.script_name'))
     # Handle setup and flushing of Ming ORM sessions

http://git-wip-us.apache.org/repos/asf/allura/blob/34e5195c/Allura/development.ini
----------------------------------------------------------------------
diff --git a/Allura/development.ini b/Allura/development.ini
index aee8bca..4c540d5 100644
--- a/Allura/development.ini
+++ b/Allura/development.ini
@@ -260,7 +260,11 @@ static.url_base = /nf/%(build_key)s/_static_/
 ; Expires header for "static" resources served through allura (e.g. icons, attachments, /nf/tool_icon_css)
 files_expires_header_secs = 1209600 ; 2 weeks
 
+; EasyWidgets settings
+; This CORS header is necessary if serving webfonts via a different domain
 ew.extra_headers = [ ('Access-Control-Allow-Origin', '*') ]
+; In production, comment this out and it will default to 1 year.  Update build_key whenever you deploy new code, instead.
+ew.cache_header_seconds = 0
 
 ; If your environment (e.g. behind a server-side proxy) needs to look at an http header to get the actual remote addr
 ;ip_address_header = X-Forwarded-For