add varnish config to ignore locales
--- a/admin/default.vcl
+++ b/admin/default.vcl
@@ -34,6 +34,17 @@
}
}
}
+sub vcl_hash {
+ # http://serverfault.com/questions/112531/ignoring-get-parameters-in-varnish-vcl
+ set req.url = regsub(req.url, "/../|/.._../", "/");
+ hash_data(req.url);
+ if (req.http.host) {
+ hash_data(req.http.host);
+ } else {
+ hash_data(server.ip);
+ }
+ return (hash);
+}
sub vcl_deliver {
if (!resp.http.Vary) {
set resp.http.Vary = "Accept-Encoding";
--- a/ckanext/datagovau/plugin.py
+++ b/ckanext/datagovau/plugin.py
@@ -26,9 +26,6 @@
lib.helpers.get_action('user_activity_list',{'id':user_dict['id']}) if x['data'].get('package')]
return created_datasets_list + active_datasets_list
-def datastore_search(context, data_dict):
- return {'success': True} # allow all datastore search
-
class DataGovAuPlugin(plugins.SingletonPlugin,
tk.DefaultDatasetForm):
'''An example IDatasetForm CKAN plugin.
@@ -39,12 +36,6 @@
plugins.implements(plugins.IConfigurer, inherit=False)
plugins.implements(plugins.IDatasetForm, inherit=False)
plugins.implements(plugins.ITemplateHelpers, inherit=False)
- plugins.implements(plugins.IAuthFunctions)
-
-
- def get_auth_functions(self):
- return {'datastore_search': datastore_search}
-
def update_config(self, config):
# Add this plugin's templates dir to CKAN's extra_template_paths, so
--- a/ckanext/datagovau/templates/package/resource_read.html
+++ b/ckanext/datagovau/templates/package/resource_read.html
@@ -14,7 +14,7 @@
<meta name="DCTERMS.Creator" scheme="AGLSTERMS.AglsAgent" content="{{ pkg['organization']['title'] }}" />
<meta name="DCTERMS.Modified" scheme="DCTERMS.ISO8601" content="{{res['revision_timestamp']}}" />
<meta name="DCTERMS.Published" scheme="DCTERMS.ISO8601" content="{{res['created']}}" />
-<meta name="DCTERMS.Source.URI" content="{{pkg.url}}" />{% endif %}
+<meta name="DCTERMS.Source.URI" content="{{pkg.url}}" />
<meta name="DCTERMS.License" content="{{pkg['license_url']}}" />
<meta name="DCTERMS.Coverage.Temporal" content="{{pkg.temporal_coverage}}" />
<meta name="DCTERMS.Coverage.Spatial" content="{{pkg.spatial_coverage}}" />